﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head> 
<title>圈小猫</title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

<style type="text/css">
BODY {
	MARGIN: 0px;
	BACKGROUND-COLOR: #000000
}
BODY {
	COLOR: #ffffff;
	FONT-FAMILY: Comic Sans MS;
	background-image: url(https://upimage.alexhchu.com/2021/01/22/ffa287ddcc2db.jpg);
	background-repeat: repeat;
	background-color: #D9D9D9;
}
TD {
	COLOR: #ffffff;
	FONT-FAMILY: Comic Sans MS
}
TH {
	COLOR: #ffffff;
	FONT-FAMILY: Comic Sans MS
}
.style6 {
	FONT-WEIGHT: bold;
	FONT-SIZE: 12px
}
.style7 {
	FONT-SIZE: 18px
}
.style8 {
	FONT-SIZE: 12px
}
.style9 {
	FONT-SIZE: 24px;
	FONT-FAMILY: "楷体_GB2312"
}
.style10 {
	COLOR: #ff0000
}
body,
td,
th {
	color: #666;
}
a {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	color: #666;
}

a:link {
	text-decoration: none;
	color: #06F;
}

a:visited {
	text-decoration: none;
	color: #09F;
}

a:hover {
	text-decoration: none;
	color: #09F;
}

a:active {
	text-decoration: none;
	color: #09F;
}
</style> 
</head> 
<body> 

<div align="center"> 
	<p align="left"></p> 
	<p>&nbsp;</p> 
	<p>&nbsp;</p> 
	<p>&nbsp;</p> 
	<p>&nbsp;</p> 
	<div id="catch-the-cat"></div> 
</div> 
<div class="style6" align="center" style="width: 100%;height: 64%;"> 
	<p id="time" class="style7">0</p> 
	<div id="loadad"></div> 
</div>  

<script> !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1360)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function o(t){var e,i;if(t||(t={}),t.initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");e=t.initialize,delete t.initialize}else if(t.Extends){var n=t.Extends;e=function(){n.apply(this,arguments)}}else e=function(){};t.Extends?(e.prototype=Object.create(t.Extends.prototype),e.prototype.constructor=e,i=t.Extends,delete t.Extends):e.prototype.constructor=e;var o=null;return t.Mixins&&(o=t.Mixins,delete t.Mixins),r(e,o),s(e,t,!0,i),e}o.extend=s,o.mixin=r,o.ignoreFinals=!1,t.exports=o},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!==n&&"string"!==n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o<n.length;o++){if(!s.hasOwnProperty(n[o])){r=i;break}r=s[n[o]],s=s[n[o]]}return r}return i}return i}},function(t,e,i){var n=i(0),s=i(17),r=i(16),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e,i){var n=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n<t.length;++n){var s=t[n];s.type===e.FLOAT?i+=s.size:i+=1}return i}}},function(t,e,i){var n=i(0),s=i(42),r=i(204),o=i(430),a=i(59),h=i(201),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new a),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),a=s?s+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);n<r;n++)o[n]=i[n].fn;return o},h.prototype.listenerCount=function(t){var e=s?s+t:t,i=this._events[e];return i?i.fn?1:i.length:0},h.prototype.emit=function(t,e,i,n,r,o){var a=s?s+t:t;if(!this._events[a])return!1;var h,l,u=this._events[a],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,i),!0;case 4:return u.fn.call(u.context,e,i,n),!0;case 5:return u.fn.call(u.context,e,i,n,r),!0;case 6:return u.fn.call(u.context,e,i,n,r,o),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=arguments[l];u.fn.apply(u.context,h)}else{var d,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,i);break;case 4:u[l].fn.call(u[l].context,e,i,n);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];u[l].fn.apply(u[l].context,h)}}return!0},h.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},h.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},h.prototype.removeListener=function(t,e,i,n){var r=s?s+t:t;if(!this._events[r])return this;if(!e)return a(this,r),this;var o=this._events[r];if(o.fn)o.fn!==e||n&&!o.once||i&&o.context!==i||a(this,r);else{for(var h=0,l=[],u=o.length;h<u;h++)(o[h].fn!==e||n&&!o[h].once||i&&o[h].context!==i)&&l.push(o[h]);l.length?this._events[r]=1===l.length?l[0]:l:a(this,r)}return this},h.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=s,h.EventEmitter=h,t.exports=h},function(t,e,i){var n=i(20),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){t.exports={Alpha:i(435),Animation:i(460),BlendMode:i(432),ComputedSize:i(1248),Crop:i(1247),Depth:i(431),Flip:i(1246),GetBounds:i(1245),Mask:i(427),Origin:i(1244),Pipeline:i(200),ScaleMode:i(1243),ScrollFactor:i(424),Size:i(1242),Texture:i(1241),TextureCrop:i(1240),Tint:i(1239),ToJSON:i(423),Transform:i(422),TransformMatrix:i(41),Visible:i(421)}},function(t,e,i){var n=i(0),s=i(17),r=i(16),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,i){t.exports={BOOT:i(1115),DESTROY:i(1114),PAUSE:i(1113),POST_UPDATE:i(1112),PRE_UPDATE:i(1111),READY:i(1110),RENDER:i(1109),RESUME:i(1108),SHUTDOWN:i(1107),SLEEP:i(1106),START:i(1105),TRANSITION_COMPLETE:i(1104),TRANSITION_INIT:i(1103),TRANSITION_OUT:i(1102),TRANSITION_START:i(1101),TRANSITION_WAKE:i(1100),UPDATE:i(1099),WAKE:i(1098)}},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){var n=i(0),s=i(423),r=i(134),o=i(11),a=i(133),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(8),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l<u;l++)if(null!=(t=arguments[l]))for(e in t)i=h[e],h!==(r=t[e])&&(c&&r&&(n(r)||(o=Array.isArray(r)))?(o?(o=!1,a=i&&Array.isArray(i)?i:[]):a=i&&n(i)?i:{},h[e]=s(c,a,r)):void 0!==r&&(h[e]=r));return h};t.exports=s},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null};t.exports=i},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c<e+s;c++)for(var d=t;d<t+i;d++){var f=o.data[c][d];if(null!==f){if(a&&-1===f.index)continue;if(h&&!f.collides)continue;if(l&&!f.hasInterestingFace)continue;u.push(f)}}return u}},function(t,e,i){var n=i(0),s=i(15),r=i(75),o=i(2),a=i(152),h=i(151),l=i(259),u=i(112),c=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=o(e,"url"),void 0===this.url?this.url=t.path+i+"."+o(e,"extension",""):"function"!=typeof this.url&&(this.url=t.path+this.url),this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?s.FILE_POPULATED:s.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===s.FILE_POPULATED?this.loader.nextFile(this,!0):(this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var n,s,r,o=i(28),a=i(130),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e<h.length;e++){var i=h[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return h.length-r()},pool:h,remove:function(t){var e=t instanceof HTMLCanvasElement;h.forEach(function(i){(e&&i.canvas===t||!e&&i.parent===t)&&(i.parent=null,i.canvas.width=1,i.canvas.height=1)})},total:r=function(){var t=0;return h.forEach(function(e){e.parent&&t++}),t}}},function(t,e){t.exports=function(t,e,i,n,s){var r=n.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(n.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return s?(o.multiplyWithOffset(s,-n.scrollX*i.scrollFactorX,-n.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=n.scrollX*i.scrollFactorX,a.f-=n.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e,i){t.exports={BLUR:i(1190),BOOT:i(1189),DESTROY:i(1188),FOCUS:i(1187),HIDDEN:i(1186),PAUSE:i(1185),POST_RENDER:i(1184),POST_STEP:i(1183),PRE_RENDER:i(1182),PRE_STEP:i(1181),READY:i(1180),RESUME:i(1179),STEP:i(1178),VISIBLE:i(1177)}},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o<h;o++)t[o][e]=i+a*n,a++;else for(o=s;o>=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n={VERSION:"3.16.1",BlendModes:i(60),ScaleModes:i(101),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(59),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Transform,s.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]}});t.exports=a},function(t,e,i){var n=i(60),s=i(12),r=i(101);t.exports=function(t,e,i){e.x=s(i,"x",0),e.y=s(i,"y",0),e.depth=s(i,"depth",0),e.flipX=s(i,"flipX",!1),e.flipY=s(i,"flipY",!1);var o=s(i,"scale",null);"number"==typeof o?e.setScale(o):null!==o&&(e.scaleX=s(o,"x",1),e.scaleY=s(o,"y",1));var a=s(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=s(a,"x",1),e.scrollFactorY=s(a,"y",1)),e.rotation=s(i,"rotation",0);var h=s(i,"angle",null);null!==h&&(e.angle=h),e.alpha=s(i,"alpha",1);var l=s(i,"origin",null);if("number"==typeof l)e.setOrigin(l);else if(null!==l){var u=s(l,"x",.5),c=s(l,"y",.5);e.setOrigin(u,c)}return e.scaleMode=s(i,"scaleMode",r.DEFAULT),e.blendMode=s(i,"blendMode",n.NORMAL),e.visible=s(i,"visible",!0),s(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n=i(0),s=i(191),r=i(409),o=i(190),a=i(408),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i){var n=i||e.fillColor,s=e.fillAlpha,r=(16711680&n)>>>16,o=(65280&n)>>>8,a=255&n;t.fillStyle="rgba("+r+","+o+","+a+","+s+")"}},function(t,e,i){var n=i(20);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o<h;o++)t[o][e]+=i+a*n,a++;else for(o=s;o>=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){(function(e){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i._nowStartTime=+new Date,i.extend=function(t,e){var n,s;"boolean"==typeof e?(n=2,s=e):(n=1,s=!0);for(var r=n;r<arguments.length;r++){var o=arguments[r];if(o)for(var a in o)s&&o[a]&&o[a].constructor===Object?t[a]&&t[a].constructor!==Object?t[a]=o[a]:(t[a]=t[a]||{},i.extend(t[a],s,o[a])):t[a]=o[a]}return t},i.clone=function(t,e){return i.extend({},e,t)},i.keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var i in t)e.push(i);return e},i.values=function(t){var e=[];if(Object.keys){for(var i=Object.keys(t),n=0;n<i.length;n++)e.push(t[i[n]]);return e}for(var s in t)e.push(t[s]);return e},i.get=function(t,e,i,n){e=e.split(".").slice(i,n);for(var s=0;s<e.length;s+=1)t=t[e[s]];return t},i.set=function(t,e,n,s,r){var o=e.split(".").slice(s,r);return i.get(t,e,0,-1)[o[o.length-1]]=n,n},i.shuffle=function(t){for(var e=t.length-1;e>0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===toString.call(t)},i.clamp=function(t,e,i){return t<e?e:t>i?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n<t.length;n+=1)i.push(e(t[n]));return i},i.topologicalSort=function(t){var e=[],n=[],s=[];for(var r in t)n[r]||s[r]||i._topologicalSort(r,n,s,t,e);return e},i._topologicalSort=function(t,e,n,s,r){var o=s[t]||[];n[t]=!0;for(var a=0;a<o.length;a+=1){var h=o[a];n[h]||(e[h]||i._topologicalSort(h,e,n,s,r))}n[t]=!1,e[t]=!0,r.push(t)},i.chain=function(){for(var t=[],e=0;e<arguments.length;e+=1){var i=arguments[e];i._chained?t.push.apply(t,i._chained):t.push(i)}var n=function(){for(var e,i=new Array(arguments.length),n=0,s=arguments.length;n<s;n++)i[n]=arguments[n];for(n=0;n<t.length;n+=1){var r=t[n].apply(e,i);void 0!==r&&(e=r)}return e};return n._chained=t,n},i.chainPathBefore=function(t,e,n){return i.set(t,e,i.chain(n,i.get(t,e)))},i.chainPathAfter=function(t,e,n){return i.set(t,e,i.chain(i.get(t,e),n))},i._requireGlobal=function(t,i){return"undefined"!=typeof window?window[t]:void 0!==e?e[t]:null}}()}).call(this,i(215))},function(t,e,i){var n=i(109),s=i(21);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d<c.length;d++){var f=c[d];f&&(f.collides?(a=n(f.x,f.y-1,!0,o),h=n(f.x,f.y+1,!0,o),l=n(f.x-1,f.y,!0,o),u=n(f.x+1,f.y,!0,o),f.faceTop=!a||!a.collides,f.faceBottom=!h||!h.collides,f.faceLeft=!l||!l.collides,f.faceRight=!u||!u.collides):f.resetFaces())}}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e){t.exports=function(t,e){var i=e.strokeColor,n=e.strokeAlpha,s=(16711680&i)>>>16,r=(65280&i)>>>8,o=255&i;t.strokeStyle="rgba("+s+","+r+","+o+","+n+")",t.lineWidth=e.lineWidth}},function(t,e,i){t.exports={DESTROY:i(1168),FADE_IN_COMPLETE:i(1167),FADE_IN_START:i(1166),FADE_OUT_COMPLETE:i(1165),FADE_OUT_START:i(1164),FLASH_COMPLETE:i(1163),FLASH_START:i(1162),PAN_COMPLETE:i(1161),PAN_START:i(1160),POST_RENDER:i(1159),PRE_RENDER:i(1158),SHAKE_COMPLETE:i(1157),SHAKE_START:i(1156),ZOOM_COMPLETE:i(1155),ZOOM_START:i(1154)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=r*c*e+-o*c*t+(-u*r+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e,i){t.exports={BOOT:i(994),DESTROY:i(993),DRAG_END:i(992),DRAG_ENTER:i(991),DRAG:i(990),DRAG_LEAVE:i(989),DRAG_OVER:i(988),DRAG_START:i(987),DROP:i(986),GAME_OUT:i(985),GAME_OVER:i(984),GAMEOBJECT_DOWN:i(983),GAMEOBJECT_DRAG_END:i(982),GAMEOBJECT_DRAG_ENTER:i(981),GAMEOBJECT_DRAG:i(980),GAMEOBJECT_DRAG_LEAVE:i(979),GAMEOBJECT_DRAG_OVER:i(978),GAMEOBJECT_DRAG_START:i(977),GAMEOBJECT_DROP:i(976),GAMEOBJECT_MOVE:i(975),GAMEOBJECT_OUT:i(974),GAMEOBJECT_OVER:i(973),GAMEOBJECT_POINTER_DOWN:i(972),GAMEOBJECT_POINTER_MOVE:i(971),GAMEOBJECT_POINTER_OUT:i(970),GAMEOBJECT_POINTER_OVER:i(969),GAMEOBJECT_POINTER_UP:i(968),GAMEOBJECT_UP:i(967),MANAGER_BOOT:i(966),MANAGER_PROCESS:i(965),MANAGER_UPDATE:i(964),POINTER_DOWN:i(963),POINTER_DOWN_OUTSIDE:i(962),POINTER_MOVE:i(961),POINTER_OUT:i(960),POINTER_OVER:i(959),POINTER_UP:i(958),POINTER_UP_OUTSIDE:i(957),POINTERLOCK_CHANGE:i(956),PRE_UPDATE:i(955),SHUTDOWN:i(954),START:i(953),UPDATE:i(952)}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=!0);var s=n.baseTileHeight,r=n.tilemapLayer;return r&&(void 0===i&&(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),s*=r.scaleY),e?Math.floor(t/s):t/s}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=!0);var s=n.baseTileWidth,r=n.tilemapLayer;return r&&(void 0===i&&(i=r.scene.cameras.main),t-=r.x+i.scrollX*(1-r.scrollFactorX),s*=r.scaleX),e?Math.floor(t/s):t/s}},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(4),l=i(8),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,n,i));return this}),t.exports=u},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(429),r=i(203),o=i(202),a=i(3),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=h},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,i){var n=i(0),s=i(13),r=i(270),o=new n({Mixins:[s.Alpha,s.Flip,s.Visible],initialize:function(t,e,i,n,s,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=s,this.height=r,this.baseWidth=void 0!==o?o:s,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=null,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(t<this.pixelX||e<this.pixelY||t>this.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return this.getLeft(t)+this.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={};for(var s=0;s<n.length;s++)n[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),t.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=n},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(74),r=i(283),o=i(282),a=i(59),h=i(198),l=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=l},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p<l;p+=2){var g=h[p]-s,v=h[p+1]-r;t.setTexture2D(),t.batchLine(d,f,g,v,c,c,u,p-2,!!e.closePath&&p===l-1),d=g,f=v}}},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(852),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){t.exports={COMPLETE:i(932),DESTROY:i(931),DETUNE:i(930),GLOBAL_DETUNE:i(929),GLOBAL_MUTE:i(928),GLOBAL_RATE:i(927),GLOBAL_VOLUME:i(926),LOOP:i(925),LOOPED:i(924),MUTE:i(923),PAUSE_ALL:i(922),PAUSE:i(921),PLAY:i(920),RATE:i(919),RESUME_ALL:i(918),RESUME:i(917),SEEK:i(916),STOP_ALL:i(915),STOP:i(914),UNLOCKED:i(913),VOLUME:i(912)}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m||m.next===m.prev)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o<a;o++)h=e[o]*n,l=o<a-1?e[o+1]*n:t.length,(u=s(t,h,l,n,!1))===u.next&&(u.steiner=!0),f.push(p(u));for(f.sort(c),o=0;o<f.length;o++)d(f[o],i),i=r(i,i.next);return i}(t,e,m,i)),t.length>80*i){n=h=t[0],a=l=t[1];for(var T=i;T<y;T+=i)u=t[T],f=t[T+1],u<n&&(n=u),f<a&&(a=f),u>h&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r<i;r+=n)o=b(r,t[r],t[r+1],o);else for(r=i-n;r>=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e<l&&(a++,n=n.nextZ);e++);for(h=l;a>0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&y(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(y(s,r,o)>=0)return!1;for(var a=s.x<r.x?s.x<o.x?s.x:o.x:r.x<o.x?r.x:o.x,h=s.y<r.y?s.y<o.y?s.y:o.y:r.y<o.y?r.y:o.y,l=s.x>r.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&y(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&y(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!m(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!i)return null;if(s===o)return i.prev;var h,l=i,u=i.x,c=i.y,d=1/0;n=i.next;for(;n!==l;)s>=n.x&&n.x>=u&&s!==n.x&&g(r<c?s:o,r,u,c,r<c?o:s,r,n.x,n.y)&&((h=Math.abs(r-n.y)/(s-n.x))<d||h===d&&n.x>i.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x<i.x&&(i=e),e=e.next}while(e!==t);return i}function g(t,e,i,n,s,r,o,a){return(s-o)*(e-a)-(t-o)*(r-a)>=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(m(t,e)&&m(i,n)||m(t,n)&&m(i,e))||y(t,e,i)>0!=y(t,e,n)>0&&y(i,n,t)>0!=y(i,n,e)>0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function w(t,e){var i=new _(t.i,t.x,t.y),n=new _(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new _(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function _(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r<i;r+=n)s+=(t[o]-t[r])*(t[r+1]+t[o+1]),o=r;return s}t.exports=n,n.deviation=function(t,e,i,n){var s=e&&e.length,r=s?e[0]*i:t.length,o=Math.abs(A(t,0,r,i));if(s)for(var a=0,h=e.length;a<h;a++){var l=e[a]*i,u=a<h-1?e[a+1]*i:t.length;o-=Math.abs(A(t,l,u,i))}var c=0;for(a=0;a<n.length;a+=3){var d=n[a]*i,f=n[a+1]*i,p=n[a+2]*i;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,s=0;s<t.length;s++){for(var r=0;r<t[s].length;r++)for(var o=0;o<e;o++)i.vertices.push(t[s][r][o]);s>0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e,i){var n={};t.exports=n;var s=i(82),r=i(87),o=i(238),a=i(36),h=i(86),l=i(546);!function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",gameObject:null,parts:[],plugin:{},angle:0,vertices:s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"),position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,ignoreGravity:!1,ignorePointer:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,render:{visible:!0,opacity:1,sprite:{xScale:1,yScale:1,xOffset:0,yOffset:0},lineWidth:0},events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inertia:0,_original:null},n=a.extend(i,e);return t(n,e),n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t}),s.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(t.bounds,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia});var i=t.isStatic?"#2e2b44":a.choose(["#006BA6","#0496FF","#FFBC42","#D81159","#8F2D56"]);t.render.fillStyle=t.render.fillStyle||i,t.render.strokeStyle=t.render.strokeStyle||"#000",t.render.sprite.xOffset+=-(t.bounds.min.x-t.position.x)/(t.bounds.max.x-t.bounds.min.x),t.render.sprite.yOffset+=-(t.bounds.min.y-t.position.y)/(t.bounds.max.y-t.bounds.min.y)};n.set=function(t,e,i){var s;for(s in"string"==typeof e&&(s=e,(e={})[s]=i),e)if(e.hasOwnProperty(s))switch(i=e[s],s){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"parts":n.setParts(t,i);break;default:t[s]=i}},n.setStatic=function(t,e){for(var i=0;i<t.parts.length;i++){var n=t.parts[i];n.isStatic=e,e?(n._original={restitution:n.restitution,friction:n.friction,mass:n.mass,inertia:n.inertia,density:n.density,inverseMass:n.inverseMass,inverseInertia:n.inverseInertia},n.restitution=0,n.friction=1,n.mass=n.inertia=n.density=1/0,n.inverseMass=n.inverseInertia=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.angularVelocity=0,n.speed=0,n.angularSpeed=0,n.motion=0):n._original&&(n.restitution=n._original.restitution,n.friction=n._original.friction,n.mass=n._original.mass,n.inertia=n._original.inertia,n.density=n._original.density,n.inverseMass=n._original.inverseMass,n.inverseInertia=n._original.inverseInertia,n._original=null)}},n.setMass=function(t,e){var i=t.inertia/(t.mass/6);t.inertia=i*(e/6),t.inverseInertia=1/t.inertia,t.mass=e,t.inverseMass=1/t.mass,t.density=t.mass/t.area},n.setDensity=function(t,e){n.setMass(t,e*t.area),t.density=e},n.setInertia=function(t,e){t.inertia=e,t.inverseInertia=1/t.inertia},n.setVertices=function(t,e){e[0].body===t?t.vertices=e:t.vertices=s.create(e,t),t.axes=l.fromVertices(t.vertices),t.area=s.area(t.vertices),n.setMass(t,t.density*t.area);var i=s.centre(t.vertices);s.translate(t.vertices,i,-1),n.setInertia(t,n._inertiaScale*s.inertia(t.vertices,t.mass)),s.translate(t.vertices,t.position),h.update(t.bounds,t.vertices,t.velocity)},n.setParts=function(t,e,i){var r;for(e=e.slice(0),t.parts.length=0,t.parts.push(t),t.parent=t,r=0;r<e.length;r++){var o=e[r];o!==t&&(o.parent=t,t.parts.push(o))}if(1!==t.parts.length){if(i=void 0===i||i){var a=[];for(r=0;r<e.length;r++)a=a.concat(e[r].vertices);s.clockwiseSort(a);var h=s.hull(a),l=s.centre(h);n.setVertices(t,h),s.translate(t.vertices,l)}var u=n._totalProperties(t);t.area=u.area,t.parent=t,t.position.x=u.centre.x,t.position.y=u.centre.y,t.positionPrev.x=u.centre.x,t.positionPrev.y=u.centre.y,n.setMass(t,u.mass),n.setInertia(t,u.inertia),n.setPosition(t,u.centre)}},n.setPosition=function(t,e){var i=r.sub(e,t.position);t.positionPrev.x+=i.x,t.positionPrev.y+=i.y;for(var n=0;n<t.parts.length;n++){var o=t.parts[n];o.position.x+=i.x,o.position.y+=i.y,s.translate(o.vertices,i),h.update(o.bounds,o.vertices,t.velocity)}},n.setAngle=function(t,e){var i=e-t.angle;t.anglePrev+=i;for(var n=0;n<t.parts.length;n++){var o=t.parts[n];o.angle+=i,s.rotate(o.vertices,i,t.position),l.rotate(o.axes,i),h.update(o.bounds,o.vertices,t.velocity),n>0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u<t.parts.length;u++){var c=t.parts[u];s.scale(c.vertices,e,i,r),c.axes=l.fromVertices(c.vertices),c.area=s.area(c.vertices),n.setMass(c,t.density*c.area),s.translate(c.vertices,{x:-c.position.x,y:-c.position.y}),n.setInertia(c,n._inertiaScale*s.inertia(c.vertices,c.mass)),s.translate(c.vertices,{x:c.position.x,y:c.position.y}),u>0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d<t.parts.length;d++){var f=t.parts[d];s.translate(f.vertices,t.velocity),d>0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i<t.parts.length;i++){var n=t.parts[i],s=n.mass!==1/0?n.mass:1;e.mass+=s,e.area+=n.area,e.inertia+=n.inertia,e.centre=r.add(e.centre,r.mult(n.position,s))}return e.centre=r.div(e.centre,e.mass),e}}()},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e,i){t.exports={ADD:i(945),COMPLETE:i(944),FILE_COMPLETE:i(943),FILE_KEY_COMPLETE:i(942),FILE_LOAD_ERROR:i(941),FILE_LOAD:i(940),FILE_PROGRESS:i(939),POST_PROCESS:i(938),PROGRESS:i(937),START:i(936)}},function(t,e,i){var n=i(0),s=i(180),r=i(10),o=i(3),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){var n=i(0),s=i(43),r=i(438),o=i(437),a=i(206),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e,i){var n={};t.exports=n;var s=i(87),r=i(36);n.create=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n],r={x:s.x,y:s.y,index:n,body:e,isInternal:!1,contact:null};r.contact={vertex:r,normalImpulse:0,tangentImpulse:0},i.push(r)}return i},n.fromPath=function(t,e){var i=[];return t.replace(/L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/gi,function(t,e,n){i.push({x:parseFloat(e),y:parseFloat(n)})}),n.create(i,e)},n.centre=function(t){for(var e,i,r,o=n.area(t,!0),a={x:0,y:0},h=0;h<t.length;h++)r=(h+1)%t.length,e=s.cross(t[h],t[r]),i=s.mult(s.add(t[h],t[r]),e),a=s.add(a,i);return s.div(a,6*o)},n.mean=function(t){for(var e={x:0,y:0},i=0;i<t.length;i++)e.x+=t[i].x,e.y+=t[i].y;return s.div(e,t.length)},n.area=function(t,e){for(var i=0,n=t.length-1,s=0;s<t.length;s++)i+=(t[n].x-t[s].x)*(t[n].y+t[s].y),n=s;return e?i/2:Math.abs(i)/2},n.inertia=function(t,e){for(var i,n,r=0,o=0,a=t,h=0;h<a.length;h++)n=(h+1)%a.length,r+=(i=Math.abs(s.cross(a[n],a[h])))*(s.dot(a[n],a[n])+s.dot(a[n],a[h])+s.dot(a[h],a[h])),o+=i;return e/6*(r/o)},n.translate=function(t,e,i){var n;if(i)for(n=0;n<t.length;n++)t[n].x+=e.x*i,t[n].y+=e.y*i;else for(n=0;n<t.length;n++)t[n].x+=e.x,t[n].y+=e.y;return t},n.rotate=function(t,e,i){if(0!==e){for(var n=Math.cos(e),s=Math.sin(e),r=0;r<t.length;r++){var o=t[r],a=o.x-i.x,h=o.y-i.y;o.x=i.x+(a*n-h*s),o.y=i.y+(a*s+h*n)}return t}},n.contains=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],s=t[(i+1)%t.length];if((e.x-n.x)*(s.y-n.y)+(e.y-n.y)*(n.x-s.x)>0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h<t.length;h++)o=t[h],a=s.sub(o,r),t[h].x=r.x+a.x*e,t[h].y=r.y+a.y*i;return t},n.chamfer=function(t,e,i,n,o){e="number"==typeof e?[e]:e||[8],i=void 0!==i?i:-1,n=n||2,o=o||14;for(var a=[],h=0;h<t.length;h++){var l=t[h-1>=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h<e.length?h:e.length-1];if(0!==d){var f=s.normalise({x:u.y-l.y,y:l.x-u.x}),p=s.normalise({x:c.y-u.y,y:u.x-c.x}),g=Math.sqrt(2*Math.pow(d,2)),v=s.mult(r.clone(f),d),y=s.normalise(s.mult(s.add(f,p),.5)),m=s.sub(u,s.mult(y,g)),x=i;-1===i&&(x=1.75*Math.pow(d,.32)),(x=r.clamp(x,n,o))%2==1&&(x+=1);for(var T=Math.acos(s.dot(f,p))/x,w=0;w<x;w++)a.push(s.add(s.rotate(v,T*w),m))}else a.push(u)}return a},n.clockwiseSort=function(t){var e=n.mean(t);return t.sort(function(t,i){return s.angle(e,t)-s.angle(e,i)}),t},n.isConvex=function(t){var e,i,n,s,r=0,o=t.length;if(o<3)return null;for(e=0;e<o;e++)if(n=(e+2)%o,s=(t[i=(e+1)%o].x-t[e].x)*(t[n].y-t[i].y),(s-=(t[i].y-t[e].y)*(t[n].x-t[i].x))<0?r|=1:s>0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i<t.length;i+=1){for(e=t[i];r.length>=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation","orthogonal"),this.renderOrder=s(t,"renderOrder","right-down"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[])}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",{}),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null)}});t.exports=r},function(t,e){t.exports=function(t,e,i){return t>=0&&t<i.width&&e>=0&&e<i.height}},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;n<e.length;n++){var s=e[n];s.x>t.max.x&&(t.max.x=s.x),s.x<t.min.x&&(t.min.x=s.x),s.y>t.max.y&&(t.max.y=s.y),s.y<t.min.y&&(t.min.y=s.y)}i&&(i.x>0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r,o){for(var a=n.getTintAppendFloatAlphaAndSwap(i.fillColor,i.fillAlpha*s),h=i.pathData,l=i.pathIndexes,u=0;u<l.length;u+=3){var c=2*l[u],d=2*l[u+1],f=2*l[u+2],p=h[c+0]-r,g=h[c+1]-o,v=h[d+0]-r,y=h[d+1]-o,m=h[f+0]-r,x=h[f+1]-o,T=e.getX(p,g),w=e.getY(p,g),b=e.getX(v,y),S=e.getY(v,y),_=e.getX(m,x),A=e.getY(m,x);t.setTexture2D(),t.batchTri(T,w,b,S,_,A,0,0,1,1,a,a,a,t.tintEffect)}}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(188);t.exports=function(t,e){if("string"==typeof t&&n.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,n[t].apply(this,i)}}return n[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,n.Power0)}},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(849),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},function(t,e,i){var n=i(450),s=i(0),r=i(133),o=i(2),a=i(4),h=i(8),l=i(316),u=i(102),c=i(67),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.classType=o(i,"classType",c),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i<t.length;i++){var n=this.createFromConfig(t[i]);e=e.concat(n)}return e},createFromConfig:function(t){if(this.isFull())return[];this.classType=o(t,"classType",this.classType);var e=o(t,"key",void 0),i=o(t,"frame",null),s=o(t,"visible",!0),r=o(t,"active",!0),h=[];if(void 0===e)return h;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);for(var u=o(t,"repeat",0),c=o(t,"randomKey",!1),d=o(t,"randomFrame",!1),f=o(t,"yoyo",!1),p=o(t,"frameQuantity",1),g=o(t,"max",0),v=l(e,i,{max:g,qty:p,random:c,randomB:d,repeat:u,yoyo:f}),y=0;y<v.length;y++){var m=this.create(0,0,v[y].a,v[y].b,s,r);if(!m)break;h.push(m)}var x=a(t,"setXY.x",0),T=a(t,"setXY.y",0),w=a(t,"setXY.stepX",0),b=a(t,"setXY.stepY",0);n.SetXY(h,x,T,w,b);var S=a(t,"setRotation.value",0),_=a(t,"setRotation.step",0);n.SetRotation(h,S,_);var A=a(t,"setScale.x",1),E=a(t,"setScale.y",A),C=a(t,"setScale.stepX",0),M=a(t,"setScale.stepY",0);n.SetScale(h,A,E,C,M);var P=a(t,"setAlpha.value",1),O=a(t,"setAlpha.step",0);n.SetAlpha(h,P,O);var R=o(t,"hitArea",null),L=o(t,"hitAreaCallback",null);R&&n.SetHitArea(h,R,L);var D=o(t,"gridAlign",!1);return D&&n.GridAlign(h,D),this.createMultipleCallback&&this.createMultipleCallback.call(this,h),h},preUpdate:function(t,e){if(this.runChildUpdate&&0!==this.children.size)for(var i=this.children.entries.slice(),n=0;n<i.length;n++){var s=i[n];s.active&&s.update(t,e)}},add:function(t,e){return void 0===e&&(e=!1),this.isFull()?this:(this.children.set(t),this.createCallback&&this.createCallback.call(this,t),e&&(this.scene.sys.displayList.add(t),t.preUpdate&&this.scene.sys.updateList.add(t)),t.on(r.DESTROY,this.remove,this),this)},addMultiple:function(t,e){if(void 0===e&&(e=!1),Array.isArray(t))for(var i=0;i<t.length;i++)this.add(t[i],e);return this},remove:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!1),this.children.contains(t)?(this.children.delete(t),this.removeCallback&&this.removeCallback.call(this,t),t.off(r.DESTROY,this.remove,this),i?t.destroy():e&&(t.scene.sys.displayList.remove(t),t.preUpdate&&t.scene.sys.updateList.remove(t)),this):this},clear:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.children,n=0;n<i.size;n++){var s=i.entries[n];s.off(r.DESTROY,this.remove,this),e?s.destroy():t&&(s.scene.sys.displayList.remove(s),s.preUpdate&&s.scene.sys.updateList.remove(s))}return this.children.clear(),this},contains:function(t){return this.children.contains(t)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getFirst:function(t,e,i,n,s,r,o){return this.getHandler(!0,1,t,e,i,n,s,r,o)},getFirstNth:function(t,e,i,n,s,r,o,a){return this.getHandler(!0,t,e,i,n,s,r,o,a)},getLast:function(t,e,i,n,s,r,o){return this.getHandler(!1,1,t,e,i,n,s,r,o)},getLastNth:function(t,e,i,n,s,r,o,a){return this.getHandler(!1,t,e,i,n,s,r,o,a)},getHandler:function(t,e,i,n,s,r,o,a,h){var l,u;void 0===i&&(i=!1),void 0===n&&(n=!1);var c=0,d=this.children.entries;if(t)for(u=0;u<d.length;u++)if((l=d[u]).active===i){if(++c===e)break}else l=null;else for(u=d.length-1;u>=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i<this.children.size;i++)this.children.entries[i].active===t&&e++;return e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?999999999999:this.maxSize)-t},setDepth:function(t,e){return n.SetDepth(this.children.entries,t,e),this},kill:function(t){this.children.contains(t)&&t.setActive(!1)},killAndHide:function(t){this.children.contains(t)&&(t.setActive(!1),t.setVisible(!1))},toggleVisible:function(){return n.ToggleVisible(this.children.entries),this},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){if(t)for(var e=this.children,i=0;i<e.size;i++){var n=e.entries[i];n.off(r.DESTROY,this.remove,this),n.destroy()}this.children.clear(),this.scene=void 0,this.children=void 0}}});t.exports=d},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(0),s=i(95),r=i(311),o=i(310),a=i(199),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;s<i;s++)t[s]=t[s+1];return t.length=i,n}}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(1096))},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var n=this.entries[i];if(n[t]===e)return n}},getArray:function(){return this.entries.slice(0)},delete:function(t){var e=this.entries.indexOf(t);return e>-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t<this.entries.length;t++){var e=this.entries[t];console.log(e)}console.groupEnd()},each:function(t,e){var i,n=this.entries.slice(),s=n.length;if(e)for(i=0;i<s&&!1!==t.call(e,n[i],i);i++);else for(i=0;i<s&&!1!==t(n[i],i);i++);return this},iterate:function(t,e){var i,n=this.entries.length;if(e)for(i=0;i<n&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<n&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){var e,i=[];for(e=1;e<arguments.length;e++)i.push(arguments[e]);var n=this.entries.length;for(e=0;e<n;e++){var s=this.entries[e];s[t].apply(s,i)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return this.entries.indexOf(t)>-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t<this.entries.length?this.entries.length=t:this.entries.length}}});t.exports=n},function(t,e,i){var n=i(70);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);return i}},function(t,e,i){var n=i(141),s=i(12),r=i(90),o=i(92),a=i(105),h=i(221),l=i(143),u=i(4),c=i(142),d=i(140),f=i(139);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:l(e),g=h(e),v=a(e,"delay",i.delay),y=a(e,"duration",i.duration),m=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),m),T=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),_=r(e,"flipX",i.flipX),A=r(e,"flipY",i.flipY),E=[],C=0;C<g.length;C++)for(var M=g[C].key,P=g[C].value,O=0;O<p.length;O++){var R=c(M,P),L=f(p[O],M,R.getEnd,R.getStart,o(u(P,"ease",x),m),a(P,"delay",v),a(P,"duration",y),r(P,"yoyo",S),a(P,"hold",T),a(P,"repeat",w),a(P,"repeatDelay",b),r(P,"flipX",_),r(P,"flipY",A));E.push(L)}var D=new d(t,E,p);D.offset=s(e,"offset",null),D.completeDelay=s(e,"completeDelay",0),D.loop=Math.round(s(e,"loop",0)),D.loopDelay=Math.round(s(e,"loopDelay",0)),D.paused=r(e,"paused",!1),D.useFrames=r(e,"useFrames",!1);for(var F=u(e,"callbackScope",D),k=[D,null],I=d.TYPES,B=0;B<I.length;B++){var Y=I[B],N=u(e,Y,!1);if(N){var X=u(e,Y+"Scope",F),z=u(e,Y+"Params",[]);D.setCallback(Y,N,k.concat(z),X)}}return D}},function(t,e){t.exports=function(t,e,i){var n;n=t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s){return t[e](i,n,s)}:function(){return t[e]}:"function"==typeof i?i:function(){return i};return n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){return this.image=t,this.glTexture=t.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setTileSize:function(t,e){return void 0!==t&&(this.tileWidth=t),void 0!==e&&(this.tileHeight=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(t,e){return void 0!==t&&(this.tileMargin=t),void 0!==e&&(this.tileSpacing=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(t,e){var i=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),n=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);i%1==0&&n%1==0||console.warn("Image tile area not tile size multiple in: "+this.name),i=Math.floor(i),n=Math.floor(n),this.rows=i,this.columns=n,this.total=i*n,this.texCoordinates.length=0;for(var s=this.tileMargin,r=this.tileMargin,o=0;o<this.rows;o++){for(var a=0;a<this.columns;a++)this.texCoordinates.push({x:s,y:r}),s+=this.tileWidth+this.tileSpacing;s=this.tileMargin,r+=this.tileHeight+this.tileSpacing}return this}});t.exports=n},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e,i){var n=i(85);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e,i){t.exports={CalculateFacesAt:i(148),CalculateFacesWithin:i(37),Copy:i(528),CreateFromTiles:i(527),CullTiles:i(526),Fill:i(525),FilterTiles:i(524),FindByIndex:i(523),FindTile:i(522),ForEachTile:i(521),GetTileAt:i(109),GetTileAtWorldXY:i(520),GetTilesWithin:i(21),GetTilesWithinShape:i(519),GetTilesWithinWorldXY:i(518),HasTileAt:i(235),HasTileAtWorldXY:i(517),IsInLayerBounds:i(85),PutTileAt:i(147),PutTileAtWorldXY:i(516),PutTilesAt:i(515),Randomize:i(514),RemoveTileAt:i(234),RemoveTileAtWorldXY:i(513),RenderDebug:i(512),ReplaceByIndex:i(236),SetCollision:i(511),SetCollisionBetween:i(510),SetCollisionByExclusion:i(509),SetCollisionByProperty:i(508),SetCollisionFromCollisionGroup:i(507),SetTileIndexCallback:i(506),SetTileLocationCallback:i(505),Shuffle:i(504),SwapByIndex:i(503),TileToWorldX:i(108),TileToWorldXY:i(502),TileToWorldY:i(107),WeightedRandomize:i(501),WorldToTileX:i(54),WorldToTileXY:i(500),WorldToTileY:i(53)}},function(t,e,i){var n=i(0),s=i(253),r=i(67),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){t.exports={ANY_KEY_DOWN:i(619),ANY_KEY_UP:i(618),COMBO_MATCH:i(617),DOWN:i(616),KEY_DOWN:i(615),KEY_UP:i(614),UP:i(613)}},function(t,e,i){var n=i(4),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){var n=i(6);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(753),a=new n({Extends:r,Mixins:[s.BlendMode,s.Depth,s.GetBounds,s.Mask,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length<c)throw new Error("Mesh Color count must match Vertex count");if(a.length>0&&a.length<c)throw new Error("Mesh Alpha count must match Vertex count");if(0===o.length)for(u=0;u<c;++u)o[u]=16777215;if(0===a.length)for(u=0;u<c;++u)a[u]=1;this.vertices=new Float32Array(n),this.uv=new Float32Array(s),this.colors=new Uint32Array(o),this.alphas=new Float32Array(a),this.tintFill=!1,this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline()}});t.exports=a},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(872),a=i(871),h=i(870),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s,a,h){void 0===s&&(s=""),void 0===h&&(h=0),r.call(this,t,"BitmapText"),this.font=n;var l=this.scene.sys.cache.bitmapFont.get(n);this.fontData=l.data,this._text="",this._fontSize=a||this.fontData.size,this._letterSpacing=0,this._align=h,this._bounds=o(this,!1,this._bounds),this._dirty=!1,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(s)},setLeftAlign:function(){return this._align=l.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=l.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=l.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},getTextBounds:function(t){return this._dirty&&o(this,t,this._bounds),this._bounds},setFont:function(t,e,i){if(void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font){var n=this.scene.sys.cache.bitmapFont.get(t);n&&(this.font=t,this.fontData=n.data,this._fontSize=e,this._align=i,this.setTexture(n.texture,n.frame),o(this,!1,this._bounds))}return this},align:{set:function(t){this._align=t,this._dirty=!0},get:function(){return this._align}},text:{set:function(t){this.setText(t)},get:function(){return this._text}},fontSize:{set:function(t){this._fontSize=t,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(t){this._letterSpacing=t,this._dirty=!0},get:function(){return this._letterSpacing}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,align:this.align};return t.data=e,t}});l.ALIGN_LEFT=0,l.ALIGN_CENTER=1,l.ALIGN_RIGHT=2,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;r<i;r*=2){n(t,e,r,s);var o=t;t=s,s=o}return t}e.inplace=function(t,e){var s=i(t,e);return s!==t&&n(s,null,t.length,t),t};var n=function(t,e,i,n){var s,r,o,a,h,l=t.length,u=0,c=2*i;for(s=0;s<l;s+=c)for(o=(r=s+i)+i,r>l&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a<r&&h<o)e(t[a],t[h])<=0?n[u++]=t[a++]:n[u++]=t[h++];else if(a<r)n[u++]=t[a++];else{if(!(h<o))break;n[u++]=t[h++]}};t.exports=e}()},function(t,e,i){var n=i(173),s=i(318);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e,i){var n=i(174),s=i(0),r=i(1),o=i(118),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],t.apply(e,i)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(0),s=i(23),r=i(19),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),y=r=s(r,0,f-i),m=this.data;if(m.trim){var x=m.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.r<e||x.b<i||x.x>T||x.y>w)){var b=Math.max(x.x,e),S=Math.max(x.y,i),_=Math.min(x.r,T)-b,A=Math.min(x.b,w)-S;v=_,y=A,p=o?h+(u-(b-x.x)-_):h+(b-x.x),g=a?l+(c-(S-x.y)-A):l+(S-x.y),e=b,i=S,n=_,r=A}else p=0,g=0,v=0,y=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var E=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/E),t.v1=Math.min(1,(g+y)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=y,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(11),r=i(69),o=i(19),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(0),s=i(70),r=i(11),o=i(69),a=i(26),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e,i){t.exports={ADD:i(1049),ERROR:i(1048),LOAD:i(1047),READY:i(1046),REMOVE:i(1045)}},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n,s=i(99),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var n=e[i]+"mageSmoothingEnabled";if(n in t)return n}return null},isEnabled:function(t){return null!==n?t[n]:null}}},function(t,e,i){var n=i(0),s=i(13),r=i(34),o=i(11),a=i(40),h=i(10),l=i(41),u=i(192),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;g<p;++g){var v=t[g];if(v.hasOwnProperty("width")&&!v.parentContainer){var y=v.width,m=v.height,x=v.x-l*v.scrollFactorX-y*v.originX,T=v.y-u*v.scrollFactorY-m*v.originY,w=x*i+T*s+a,b=x*n+T*r+h,S=(x+y)*i+(T+m)*s+a,_=(x+y)*n+(T+m)*r+h,A=this.y,E=A+d,C=this.x;S>C&&w<C+c&&_>A&&b<E&&f.push(v)}else f.push(v)}return f},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,v=(o*l-a*h)*u,y=(r*h-s*l)*u,m=Math.cos(this.rotation),x=Math.sin(this.rotation),T=this.zoom,w=this.resolution,b=this.scrollX,S=this.scrollY,_=t+(b*m-S*x)*T,A=e+(b*x+S*m)*T;return i.x=(_*d+A*p)*w+v,i.y=(_*f+A*g)*w+y,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];Array.isArray(n)?this.ignore(n):n.isParent?this.ignore(n.getChildren()):n.cameraFilter|=e}return this},preRender:function(t){var e=this.width,i=this.height,n=.5*e,s=.5*i,r=this.zoom*t,o=this.matrix,a=e*this.originX,h=i*this.originY,l=this.scrollX,u=this.scrollY;this.useBounds&&(l=this.clampX(l),u=this.clampY(u)),this.roundPixels&&(a=Math.round(a),h=Math.round(h)),this.scrollX=l,this.scrollY=u;var c=l+n,d=u+s;this.midPoint.set(c,d);var f=e/r,p=i/r;this.worldView.setTo(c-f/2,d-p/2,f,p),o.applyITRS(this.x+a,this.y+h,this.rotation,r,r),o.translate(-a,-h)},clampX:function(t){var e=this._bounds,i=this.displayWidth,n=e.x+(i-this.width)/2,s=Math.max(n,n+e.width-i);return t<n?t=n:t>s&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return t<n?t=n:t>s&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.sceneManager=t.sys.game.scene,this.scaleManager=t.sys.scale;var e=this.scaleManager.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e){t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){t.exports={DESTROY:i(1234)}},function(t,e,i){var n=i(0),s=i(420),r=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},setValue:function(t,e){if(this._frozen)return this;if(this.has(t))this.values[t]=e;else{var i=this,n=this.list,r=this.events,o=this.parent;Object.defineProperty(this.values,t,{enumerable:!0,configurable:!0,get:function(){return n[t]},set:function(e){if(!i._frozen){var a=n[t];n[t]=e,r.emit(s.CHANGE_DATA,o,t,e,a),r.emit(s.CHANGE_DATA_KEY+t,o,e,a)}}}),n[t]=e,r.emit(s.SET_DATA,o,t,e)}return this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[1]=s,i[2]=this.list[s],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){if(this.has(t)){var e=this.list[t];delete this.list[t],delete this.values[t],this.events.emit(s.REMOVE_DATA,this.parent,t,e)}return this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(s.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(s.CHANGE_DATA),this.events.off(s.SET_DATA),this.events.off(s.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=r},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){t.exports={ADD_ANIMATION:i(1266),ANIMATION_COMPLETE:i(1265),ANIMATION_REPEAT:i(1264),ANIMATION_RESTART:i(1263),ANIMATION_START:i(1262),PAUSE_ALL:i(1261),REMOVE_ANIMATION:i(1260),RESUME_ALL:i(1259),SPRITE_ANIMATION_COMPLETE:i(1258),SPRITE_ANIMATION_KEY_COMPLETE:i(1257),SPRITE_ANIMATION_KEY_REPEAT:i(1256),SPRITE_ANIMATION_KEY_RESTART:i(1255),SPRITE_ANIMATION_KEY_START:i(1254),SPRITE_ANIMATION_KEY_UPDATE:i(1253),SPRITE_ANIMATION_REPEAT:i(1252),SPRITE_ANIMATION_RESTART:i(1251),SPRITE_ANIMATION_START:i(1250),SPRITE_ANIMATION_UPDATE:i(1249)}},function(t,e,i){var n=i(60),s=i(77),r=i(43),o=i(0),a=i(13),h=i(18),l=i(10),u=i(42),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.ScaleMode,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){return void 0===i&&(i=!0),this.width=t,this.height=e,i&&this.input&&this.input.hitArea instanceof l&&(this.input.hitArea.width=t,this.input.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n={};t.exports=n;var s=i(82),r=i(36),o=i(72),a=i(86),h=i(87),l=i(1290);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d<i;d+=1){var f=c+d*l,p=Math.cos(f)*a,g=Math.sin(f)*a;u+="L "+p.toFixed(3)+" "+g.toFixed(3)+" "}var v={label:"Polygon Body",position:{x:t,y:e},vertices:s.fromPath(u)};if(h.chamfer){var y=h.chamfer;v.vertices=s.chamfer(v.vertices,y.radius,y.quality,y.qualityMin,y.qualityMax),delete h.chamfer}return o.create(r.extend({},v,h))},n.fromVertices=function(t,e,i,n,u,c,d){var f,p,g,v,y,m,x,T,w;for(n=n||{},p=[],u=void 0!==u&&u,c=void 0!==c?c:.01,d=void 0!==d?d:10,l||r.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."),r.isArray(i[0])||(i=[i]),T=0;T<i.length;T+=1)if(v=i[T],(g=s.isConvex(v))||!l)v=g?s.clockwiseSort(v):s.hull(v),p.push({position:{x:t,y:e},vertices:v});else{var b=v.map(function(t){return[t.x,t.y]});l.makeCCW(b),!1!==c&&l.removeCollinearPoints(b,c);var S=l.quickDecomp(b);for(y=0;y<S.length;y++){var _=S[y].map(function(t){return{x:t[0],y:t[1]}});d>0&&s.area(_)<d||p.push({position:s.centre(_),vertices:_})}}for(y=0;y<p.length;y++)p[y]=o.create(r.extend(p[y],n));if(u)for(y=0;y<p.length;y++){var A=p[y];for(m=y+1;m<p.length;m++){var E=p[m];if(a.overlaps(A.bounds,E.bounds)){var C=A.vertices,M=E.vertices;for(x=0;x<A.vertices.length;x++)for(w=0;w<E.vertices.length;w++){var P=h.magnitudeSquared(h.sub(C[(x+1)%C.length],M[w])),O=h.magnitudeSquared(h.sub(C[x],M[(w+1)%M.length]));P<5&&O<5&&(C[x].isInternal=!0,M[w].isInternal=!0)}}}}return p.length>1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(0),s=i(14),r=i(5),o=i(89),a=new n({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){void 0===i&&(i=!1);for(var n=0;n<this.totalData;n++){var s=this.data[n];if(s.key===t){s.end=e,i&&(s.start=s.current);break}}return this},restart:function(){return this.state===o.REMOVED?(this.seek(0),this.parent.makeActive(this)):(this.stop(),this.play()),this},calcDuration:function(){for(var t=0,e=this.data,i=0;i<this.totalData;i++){var n=e[i];n.t1=n.duration+n.hold,n.yoyo&&(n.t1+=n.duration),n.t2=n.t1+n.repeatDelay,n.totalDuration=n.delay+n.t1,-1===n.repeat?n.totalDuration+=999999999999*n.t2:n.repeat>0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i<this.totalData;i++){var n=t[i],s=n.target,r=n.gen;n.delay=r.delay(i,e,s),n.duration=r.duration(i,e,s),n.hold=r.hold(i,e,s),n.repeat=r.repeat(i,e,s),n.repeatDelay=r.repeatDelay(i,e,s)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.paused&&!this.parentIsTimeline?(this.state=o.PENDING_ADD,this._pausedState=o.INIT,!1):(this.state=o.INIT,!0)},nextState:function(){if(this.loopCounter>0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state===o.ACTIVE)return this;this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;return this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this)),this},resetTweenData:function(t){for(var e=this.data,i=0;i<this.totalData;i++){var n=e[i];n.progress=0,n.elapsed=0,n.repeatCounter=-1===n.repeat?999999999999:n.repeat,t?(n.start=n.getStartValue(n.target,n.key,n.start),n.end=n.getEndValue(n.target,n.key,n.end),n.current=n.start,n.state=o.PLAYING_FORWARD):n.delay>0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i<this.totalData;i++){var n=this.totalDuration*t,s=e[i],r=0,o=0;n<=s.delay?(r=0,o=0):n>=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&n<s.totalDuration&&(n-=s.delay,(n=(n-=s.t1)/s.t2%1*s.t2)>s.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}return this},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}return this},stop:function(t){return this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state!==o.PAUSED&&this.state!==o.PENDING_ADD||(this.parent._destroy.push(this),this.parent._toProcess++),this.state=o.PENDING_REMOVE),this},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n<this.totalData;n++)this.updateTweenData(this,this.data[n],e)&&(i=!0);i||this.nextState();break;case o.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=o.ACTIVE);break;case o.OFFSET_DELAY:if(this.countdown-=e,this.countdown<=0){var s=this.callbacks.onStart;s&&(s.params[1]=this.targets,s.func.apply(s.scope,s.params)),this.state=o.ACTIVE}break;case o.COMPLETE_DELAY:if(this.countdown-=e,this.countdown<=0){var r=this.callbacks.onComplete;r&&r.func.apply(r.scope,r.params),this.state=o.PENDING_REMOVE}}return this.state===o.PENDING_REMOVE},setStateFromEnd:function(t,e,i){if(e.yoyo){e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onYoyo;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.start=e.getStartValue(e.target,e.key,e.start),o.PLAYING_BACKWARD}if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function n(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},l=typeof e;if("number"===l)a=function(){return e};else if("string"===l){var u=e[0],c=parseFloat(e.substr(2));switch(u){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===l?a=e:"object"===l&&(i(o=e)||n(o))?(n(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(31),s=i(83),r=i(233),o=i(225);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",n.ARRAY_2D,u,i,a,c);else if(void 0!==e){var f=t.cache.tilemap.get(e);f?d=r(e,f.format,f.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new s({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},function(t,e,i){var n=i(31),s=i(84),r=i(83),o=i(61);t.exports=function(t,e,i,a,h){for(var l=new s({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p<e.length;p++){c[p]=[];for(var g=e[p],v=0;v<g.length;v++){var y=parseInt(g[v],10);isNaN(y)||-1===y?c[p][v]=h?null:new o(l,-1,v,p,i,a):c[p][v]=new o(l,y,v,p,i,a)}0===f&&(f=g.length)}return u.width=l.width=f,u.height=l.height=d,u.widthInPixels=l.widthInPixels=f*i,u.heightInPixels=l.heightInPixels=d*a,l.data=c,u}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var n=i(61),s=i(85),r=i(148),o=i(62);t.exports=function(t,e,i,a,h){if(!s(e,i,h))return null;void 0===a&&(a=!0);var l=h.data[i][e],u=l&&l.collides;if(t instanceof n)null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,t.width,t.height)),h.data[i][e].copy(t);else{var c=t;null===h.data[i][e]?h.data[i][e]=new n(h,c,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=c}var d=h.data[i][e],f=-1!==h.collideIndexes.indexOf(d.index);return o(d,f),a&&u!==d.collides&&r(e,i,h),d}},function(t,e,i){var n=i(109);t.exports=function(t,e,i){var s=n(t,e,!0,i),r=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=s&&s.collides;return l&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),r&&r.collides&&(l&&(s.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(s.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(s.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(s.faceRight=!1),h.faceLeft=!l),s&&!s.collides&&s.resetFaces(),s}},function(t,e,i){var n={};t.exports=n;var s=i(210),r=i(36),o=i(86),a=i(72);n.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},n.setModified=function(t,e,i,s){if(t.isModified=e,i&&t.parent&&n.setModified(t.parent,e,i,s),s)for(var r=0;r<t.composites.length;r++){var o=t.composites[r];n.setModified(o,e,i,s)}},n.add=function(t,e){var i=[].concat(e);s.trigger(t,"beforeAdd",{object:e});for(var o=0;o<i.length;o++){var a=i[o];switch(a.type){case"body":if(a.parent!==a){r.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}n.addBody(t,a);break;case"constraint":n.addConstraint(t,a);break;case"composite":n.addComposite(t,a);break;case"mouseConstraint":n.addConstraint(t,a.constraint)}}return s.trigger(t,"afterAdd",{object:e}),t},n.remove=function(t,e,i){var r=[].concat(e);s.trigger(t,"beforeRemove",{object:e});for(var o=0;o<r.length;o++){var a=r[o];switch(a.type){case"body":n.removeBody(t,a,i);break;case"constraint":n.removeConstraint(t,a,i);break;case"composite":n.removeComposite(t,a,i);break;case"mouseConstraint":n.removeConstraint(t,a.constraint)}}return s.trigger(t,"afterRemove",{object:e}),t},n.addComposite=function(t,e){return t.composites.push(e),e.parent=t,n.setModified(t,!0,!0,!1),t},n.removeComposite=function(t,e,i){var s=t.composites.indexOf(e);if(-1!==s&&(n.removeCompositeAt(t,s),n.setModified(t,!0,!0,!1)),i)for(var r=0;r<t.composites.length;r++)n.removeComposite(t.composites[r],e,!0);return t},n.removeCompositeAt=function(t,e){return t.composites.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addBody=function(t,e){return t.bodies.push(e),n.setModified(t,!0,!0,!1),t},n.removeBody=function(t,e,i){var s=t.bodies.indexOf(e);if(-1!==s&&(n.removeBodyAt(t,s),n.setModified(t,!0,!0,!1)),i)for(var r=0;r<t.composites.length;r++)n.removeBody(t.composites[r],e,!0);return t},n.removeBodyAt=function(t,e){return t.bodies.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addConstraint=function(t,e){return t.constraints.push(e),n.setModified(t,!0,!0,!1),t},n.removeConstraint=function(t,e,i){var s=t.constraints.indexOf(e);if(-1!==s&&n.removeConstraintAt(t,s),i)for(var r=0;r<t.composites.length;r++)n.removeConstraint(t.composites[r],e,!0);return t},n.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),n.setModified(t,!0,!0,!1),t},n.clear=function(t,e,i){if(i)for(var s=0;s<t.composites.length;s++)n.clear(t.composites[s],e,!0);return e?t.bodies=t.bodies.filter(function(t){return t.isStatic}):t.bodies.length=0,t.constraints.length=0,t.composites.length=0,n.setModified(t,!0,!0,!1),t},n.allBodies=function(t){for(var e=[].concat(t.bodies),i=0;i<t.composites.length;i++)e=e.concat(n.allBodies(t.composites[i]));return e},n.allConstraints=function(t){for(var e=[].concat(t.constraints),i=0;i<t.composites.length;i++)e=e.concat(n.allConstraints(t.composites[i]));return e},n.allComposites=function(t){for(var e=[].concat(t.composites),i=0;i<t.composites.length;i++)e=e.concat(n.allComposites(t.composites[i]));return e},n.get=function(t,e,i){var s,r;switch(i){case"body":s=n.allBodies(t);break;case"constraint":s=n.allConstraints(t);break;case"composite":s=n.allComposites(t).concat(t)}return s?0===(r=s.filter(function(t){return t.id.toString()===e.toString()})).length?null:r[0]:null},n.move=function(t,e,i){return n.remove(t,e),n.add(i,e),t},n.rebase=function(t){for(var e=n.allBodies(t).concat(n.allConstraints(t)).concat(n.allComposites(t)),i=0;i<e.length;i++)e[i].id=r.nextId();return n.setModified(t,!0,!0,!1),t},n.translate=function(t,e,i){for(var s=i?n.allBodies(t):t.bodies,r=0;r<s.length;r++)a.translate(s[r],e);return n.setModified(t,!0,!0,!1),t},n.rotate=function(t,e,i,s){for(var r=Math.cos(e),o=Math.sin(e),h=s?n.allBodies(t):t.bodies,l=0;l<h.length;l++){var u=h[l],c=u.position.x-i.x,d=u.position.y-i.y;a.setPosition(u,{x:i.x+(c*r-d*o),y:i.y+(c*o+d*r)}),a.rotate(u,e)}return n.setModified(t,!0,!0,!1),t},n.scale=function(t,e,i,s,r){for(var o=r?n.allBodies(t):t.bodies,h=0;h<o.length;h++){var l=o[h],u=l.position.x-s.x,c=l.position.y-s.y;a.setPosition(l,{x:s.x+u*e,y:s.y+c*i}),a.scale(l,e,i)}return n.setModified(t,!0,!0,!1),t},n.bounds=function(t){for(var e=n.allBodies(t),i=[],s=0;s<e.length;s+=1){var r=e[s];i.push(r.bounds.min,r.bounds.max)}return o.create(i)}},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=i(344),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},function(t,e,i){var n=i(19),s=i(112);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){t.exports={BUTTON_DOWN:i(633),BUTTON_UP:i(632),CONNECTED:i(631),DISCONNECTED:i(630),GAMEPAD_BUTTON_DOWN:i(629),GAMEPAD_BUTTON_UP:i(628)}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,T=t.y1,w=0;w<e.length&&(r=(p*(l=d*(o=e[w].x-x)+f*(a=e[w].y-T))-g*(h=u*o+c*a))*m,!((s=(v*h-g*l)*m)>=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.right<e.x||t.bottom<e.y||t.x>e.right||t.y>e.bottom)}},function(t,e,i){var n=i(0),s=i(116),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,t=this.frame,this.uv[0]=t.u0,this.uv[1]=t.v0,this.uv[2]=t.u0,this.uv[3]=t.v1,this.uv[4]=t.u1,this.uv[5]=t.v1,this.uv[6]=t.u0,this.uv[7]=t.v0,this.uv[8]=t.u1,this.uv[9]=t.v1,this.uv[10]=t.u1,this.uv[11]=t.v0,this},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s<t.points.length;r=s){var o=t.points[s].x,a=t.points[s].y,h=t.points[r].x,l=t.points[r].y;(a<=i&&i<l||l<=i&&i<a)&&e<(h-o)*(i-a)/(l-a)+o&&(n=!n)}return n}},function(t,e,i){var n=i(0),s=i(160),r=i(289),o=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n<t.length;n++)e={x:0,y:0},"number"==typeof t[n]||"string"==typeof t[n]?(e.x=parseFloat(t[n]),e.y=parseFloat(t[n+1]),n++):Array.isArray(t[n])?(e.x=t[n][0],e.y=t[n][1]):(e.x=t[n].x,e.y=t[n].y),this.points.push(e),e.y<i&&(i=e.y);return this.calculateArea(i),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var t,e,i=0,n=0;n<this.points.length-1;n++)t=this.points[n],i+=((e=this.points[n+1]).x-t.x)*(t.y+e.y);return t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=.5*-i,this.area},getPoints:function(t,e,i){return r(this,t,e,i)}});t.exports=o},function(t,e,i){var n=i(24),s=i(0),r=i(13),o=i(28),a=i(18),h=i(376),l=i(130),u=i(828),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.displayFrame=this.displayTexture.get(t),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0!==t&&(this.tileScaleX=t),void 0!==e&&(this.tileScaleY=e),this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame,e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(179),s=i(24),r=i(0),o=i(13),a=i(28),h=i(18),l=i(834),u=i(4),c=i(343),d=i(833),f=i(830),p=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,d],initialize:function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.renderer=t.sys.game.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=s.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text="",this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=t.sys.game.config.resolution),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&(this.lineSpacing=r.lineSpacing),this.setText(n),t.sys.game.config.renderType===a.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var n="",s=t.replace(/ +/gi," ").split(this.splitRegExp),r=s.length,o=0;o<r;o++){var a=s[o],h="";if(a=a.replace(/^ *|\s*$/gi,""),e.measureText(a).width<i)n+=a+"\n";else{for(var l=i,u=a.split(" "),c=0;c<u.length;c++){var d=u[c],f=d+" ",p=e.measureText(f).width;if(p>l){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;r<s.length;r++){for(var o=i,a=s[r].split(" "),h=0;h<a.length;h++){var l=e.measureText(a[h]).width,u=l+e.measureText(" ").width;u>o?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h],h<a.length-1&&(n+=" "))}r<s.length-1&&(n+="\n")}return n},getWrappedText:function(t){return void 0===t&&(t=this._text),this.style.syncFont(this.canvas,this.context),this.runWordWrap(t).split(this.splitRegExp)},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this._text&&(this._text=t.toString(),this.updateText()),this},setStyle:function(t){return this.style.setStyle(t)},setFont:function(t){return this.style.setFont(t)},setFontFamily:function(t){return this.style.setFontFamily(t)},setFontSize:function(t){return this.style.setFontSize(t)},setFontStyle:function(t){return this.style.setFontStyle(t)},setFixedSize:function(t,e){return this.style.setFixedSize(t,e)},setBackgroundColor:function(t){return this.style.setBackgroundColor(t)},setFill:function(t){return this.style.setFill(t)},setColor:function(t){return this.style.setColor(t)},setStroke:function(t,e){return this.style.setStroke(t,e)},setShadow:function(t,e,i,n,s,r){return this.style.setShadow(t,e,i,n,s,r)},setShadowOffset:function(t,e){return this.style.setShadowOffset(t,e)},setShadowColor:function(t){return this.style.setShadowColor(t)},setShadowBlur:function(t){return this.style.setShadowBlur(t)},setShadowStroke:function(t){return this.style.setShadowStroke(t)},setShadowFill:function(t){return this.style.setShadowFill(t)},setWordWrapWidth:function(t,e){return this.style.setWordWrapWidth(t,e)},setWordWrapCallback:function(t,e){return this.style.setWordWrapCallback(t,e)},setAlign:function(t){return this.style.setAlign(t)},setResolution:function(t){return this.style.setResolution(t)},setLineSpacing:function(t){return this.lineSpacing=t,this.updateText()},setPadding:function(t,e,i,n){if("object"==typeof t){var s=t,r=u(s,"x",null);null!==r?(t=r,i=r):(t=u(s,"left",0),i=u(s,"right",t));var o=u(s,"y",null);null!==o?(e=o,n=o):(e=u(s,"top",0),n=u(s,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=n,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},updateText:function(){var t=this.canvas,e=this.context,i=this.style,n=i.resolution,s=i.metrics;i.syncFont(t,e);var r=this._text;(i.wordWrapWidth||i.wordWrapCallback)&&(r=this.runWordWrap(this._text));var o,a,h=r.split(this.splitRegExp),u=l(this,s,h),c=this.padding,d=u.width+c.left+c.right,f=u.height+c.top+c.bottom;0===i.fixedWidth&&(this.width=d),0===i.fixedHeight&&(this.height=f),this.updateDisplayOrigin(),d*=n,f*=n,d=Math.max(d,1),f=Math.max(f,1),t.width!==d||t.height!==f?(t.width=d,t.height=f,this.frame.setSize(d,f),i.syncFont(t,e)):e.clearRect(0,0,d,f),e.save(),e.scale(n,n),i.backgroundColor&&(e.fillStyle=i.backgroundColor,e.fillRect(0,0,d,f)),i.syncStyle(t,e),e.textBaseline="alphabetic",e.translate(c.left,c.top);for(var p=0;p<u.lines;p++)o=i.strokeThickness/2,a=i.strokeThickness/2+p*u.lineHeight+s.ascent,p>0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(60),s=i(131),r=i(24),o=i(0),a=i(13),h=i(28),l=i(121),u=i(18),c=i(840),d=i(9),f=i(299),p=new o({Extends:u,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScaleMode,a.ScrollFactor,a.Tint,a.Transform,a.Visible,c],initialize:function(t,e,i,n,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===o&&(o=32),u.call(this,t,"RenderTexture"),this.renderer=t.sys.game.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=r.create2D(this,n,o),this.context=this.canvas.getContext("2d"),this.framebuffer=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(f(),this.canvas),this.frame=this.texture.get(),this._saved=!1,this._eraseMode=!1,this.camera=new s(0,0,n,o),this.dirty=!1,this.gl=null;var a=this.renderer;if(a.type===h.WEBGL){var l=a.gl;this.gl=l,this.drawGameObject=this.batchGameObjectWebGL,this.framebuffer=a.createFramebuffer(n,o,this.frame.source.glTexture,!1)}else a.type===h.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas);this.camera.setScene(t),this.setPosition(e,i),this.setSize(n,o),this.setOrigin(0,0),this.initPipeline()},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){if(void 0===e&&(e=t),t!==this.width||e!==this.height){if(this.canvas.width=t,this.canvas.height=e,this.gl){var i=this.gl;this.renderer.deleteTexture(this.frame.source.glTexture),this.renderer.deleteFramebuffer(this.framebuffer),this.frame.source.glTexture=this.renderer.createTexture2D(0,i.NEAREST,i.NEAREST,i.CLAMP_TO_EDGE,i.CLAMP_TO_EDGE,i.RGBA,null,t,e,!1),this.framebuffer=this.renderer.createFramebuffer(t,e,this.frame.source.glTexture,!1),this.frame.glTexture=this.frame.source.glTexture}this.frame.source.width=t,this.frame.source.height=e,this.camera.setSize(t,e),this.frame.setSize(t,e),this.width=t,this.height=e}return this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e){void 0===e&&(e=1);var i=255&(t>>16|0),n=255&(t>>8|0),s=255&(0|t);if(this.gl){var r=this.renderer,o=this.getBounds();r.setFramebuffer(this.framebuffer,!0),this.pipeline.drawFillRect(o.x,o.y,o.right,o.bottom,d.getTintFromFloats(i/255,n/255,s/255,1),e),r.setFramebuffer(null,!0)}else this.context.fillStyle="rgba("+i+","+n+","+s+","+e+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height);return this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,this.canvas.width,this.canvas.height),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.width,0,this.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.width,0,this.height,-1e3,1e3),d.batchTextureFrame(a,i,n,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i,n,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;r<t.length;r++){var o=t[r];o&&o!==this&&(o.renderWebGL||o.renderCanvas?this.drawGameObject(o,e,i):o.isParent||o.list?this.batchGroup(o.getChildren(),e,i):"string"==typeof o?this.batchTextureFrameKey(o,null,e,i,n,s):o instanceof l?this.batchTextureFrame(o,e,i,n,s):Array.isArray(o)&&this.batchList(o,e,i,n,s))}},batchGroup:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);for(var n=0;n<t.length;n++){var s=t[n];if(s.willRender()){var r=s.x+e,o=s.y+i;this.drawGameObject(s,r,o)}}},batchGameObjectWebGL:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var n=t.x,s=t.y;this._eraseMode||this.renderer.setBlendMode(t.blendMode),t.setPosition(e,i),t.renderWebGL(this.renderer,t,0,this.camera,null),t.setPosition(n,s)},batchGameObjectCanvas:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var s=t.x,r=t.y;if(this._eraseMode){var o=t.blendMode;t.blendMode=n.ERASE}t.setPosition(e,i),t.renderCanvas(this.renderer,t,0,this.camera,null),t.setPosition(s,r),this._eraseMode&&(t.blendMode=o)},batchTextureFrameKey:function(t,e,i,n,s,r){var o=this.textureManager.getFrame(t,e);o&&this.batchTextureFrame(o,i,n,s,r)},batchTextureFrame:function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=0),this.gl)this.pipeline.batchTextureFrame(t,e,i,s,n,this.camera.matrix,null);else{var r=this.context,o=t.canvasData,a=t.source.image,h=this.camera.matrix;r.globalAlpha=this.globalAlpha,r.setTransform(h[0],h[1],h[2],h[3],h[4],h[5]),r.drawImage(a,o.x,o.y,o.width,o.height,e,i,o.width,o.height)}},preDestroy:function(){this._saved||(r.remove(this.canvas),this.gl&&this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.framebuffer=null,this.texture=null)}});t.exports=p},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(307),a=i(120),h=i(305),l=i(844),u=new n({Extends:r,Mixins:[s.Depth,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s<n.length;s++)this.createEmitter(n[s])}},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){this.frame=this.texture.get(t);var e=[];return this.texture.getFramesFromTextureSource(this.frame.sourceIndex).forEach(function(t){e.push(t.name)}),this.frameNames=e,this.defaultFrame=this.frame,this},setEmitterFrames:function(t,e){Array.isArray(t)||(t=[t]);var i=e.frames;i.length=0;for(var n=0;n<t.length;n++){var s=t[n];-1!==this.frameNames.indexOf(s)&&i.push(this.texture.get(s))}return i.length>0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;s<n.length;s++){var r=n[s];r.active&&r.emitParticle(t,e,i)}return this},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},getProcessors:function(){return this.wells.getAll("active",!0)},preUpdate:function(t,e){e*=this.timeScale;for(var i=this.emitters.list,n=0;n<i.length;n++){var s=i[n];s.active&&s.preUpdate(t,e)}},setAlpha:function(){},setScrollFactor:function(){},setBlendMode:function(){}});t.exports=u},function(t,e,i){var n=i(6);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(131),s=i(0),r=i(167),o=i(435),a=i(432),h=i(431),l=i(427),u=i(200),c=i(422),d=i(421),f=i(424),p=i(96),g=i(18),v=i(2),y=i(4),m=i(20),x=i(854),T=new s({Extends:g,Mixins:[o,a,h,l,u,c,d,f,x],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);g.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,m.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,m.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=v(s,"tl",20),o=v(s,"tr",20),a=v(s,"bl",20),h=v(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-m.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,m.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,m.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-m.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=v(s,"tl",20),o=v(s,"tr",20),a=v(s,"bl",20),h=v(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-m.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,m.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,m.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-m.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n<i;n++)this.lineTo(t[n].x,t[n].y);return e&&this.lineTo(t[0].x,t[0].y),this.strokePath(),this},fillPoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n<i;n++)this.lineTo(t[n].x,t[n].y);return e&&this.lineTo(t[0].x,t[0].y),this.fillPath(),this},strokeEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.strokePoints(i,!0)},strokeEllipse:function(t,e,i,n,s){void 0===s&&(s=32);var r=new p(t,e,i,n).getPoints(s);return this.strokePoints(r,!0)},fillEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.fillPoints(i,!0)},fillEllipse:function(t,e,i,n,s){void 0===s&&(s=32);var r=new p(t,e,i,n).getPoints(s);return this.fillPoints(r,!0)},arc:function(t,e,i,n,s,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(r.ARC,t,e,i,n,s,o,a),this},slice:function(t,e,i,n,s,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,o,a),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,T.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new n,t.exports=T},function(t,e,i){var n=i(117),s=i(0),r=i(860),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(174),s=i(60),r=i(0),o=i(13),a=i(133),h=i(18),l=i(10),u=i(863),c=i(313),d=i(3),f=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.ScrollFactor,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n<e.length;n++){var s=e[n];s.getBounds&&(s.getBounds(i),c(i,t,t))}return t},addHandler:function(t){t.once(a.DESTROY,this.remove,this),this.exclusive&&(this._displayList.remove(t),t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this)},removeHandler:function(t){t.off(a.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null)},pointToContainer:function(t,e){if(void 0===e&&(e=new d),this.parentContainer)return this.parentContainer.pointToContainer(t,e);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return n.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return n.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),n.StableSort.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e,i,s){return n.CountAllMatching(this.list,t,e,i,s)},swap:function(t,e){return n.Swap(this.list,t,e),this},moveTo:function(t,e){return n.MoveTo(this.list,t,e),this},remove:function(t,e){var i=n.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var s=0;s<i.length;s++)i[s].destroy()}return this},removeAt:function(t,e){var i=n.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var s=n.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<s.length;r++)s[r].destroy();return this},removeAll:function(t){var e=n.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return n.BringToTop(this.list,t),this},sendToBack:function(t){return n.SendToBack(this.list,t),this},moveUp:function(t){return n.MoveUp(this.list,t),this},moveDown:function(t){return n.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e,i){return n.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<r;i++)n[0]=s[i],t.apply(e,n);return this},iterate:function(t,e){var i,n=[null];for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<this.list.length;i++)n[0]=this.list[i],t.apply(e,n);return this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(867),s=i(864),r=i(0),o=i(13),a=i(121),h=i(18),l=i(120),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r<s.length;r++){var o=s[r];t.call(this,o,r)}return s},createMultiple:function(t,e,i){void 0===e&&(e=this.frame.name),void 0===i&&(i=!0),Array.isArray(e)||(e=[e]);var n=[],s=this;return e.forEach(function(e){for(var r=0;r<t;r++)n.push(s.create(0,0,e,i))}),n},childCanRender:function(t){return t.visible&&t.alpha>0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},function(t,e,i){t.exports={Matrix:i(900),Add:i(893),AddAt:i(892),BringToTop:i(891),CountAllMatching:i(890),Each:i(889),EachInRange:i(888),FindClosestInSorted:i(434),GetAll:i(887),GetFirst:i(886),GetRandom:i(172),MoveDown:i(885),MoveTo:i(884),MoveUp:i(883),NumberArray:i(882),NumberArrayStep:i(881),QuickSelect:i(317),Range:i(316),Remove:i(177),RemoveAt:i(880),RemoveBetween:i(879),RemoveRandomElement:i(878),Replace:i(877),RotateLeft:i(418),RotateRight:i(417),SafeRange:i(68),SendToBack:i(876),SetAll:i(875),Shuffle:i(132),SpliceOne:i(97),StableSort:i(118),Swap:i(874)}},function(t,e,i){var n=i(0),s=i(121),r=i(320),o=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o<i.length;o++)this.source.push(new r(this,i[o],n,s))},add:function(t,e,i,n,r,o){var a=new s(this,t,e,i,n,r,o);return this.frames[t]=a,1===this.frameTotal&&(this.firstFrame=t),this.frameTotal++,a},has:function(t){return this.frames[t]},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn("Texture.frame missing: "+t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return-1},getFramesFromTextureSource:function(t,e){void 0===e&&(e=!1);var i=[];for(var n in this.frames)if("__BASE"!==n||e){var s=this.frames[n];s.sourceIndex===t&&i.push(s)}return i},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);if(!t){var i=e.indexOf("__BASE");-1!==i&&e.splice(i,1)}return e},getSourceImage:function(t){void 0!==t&&null!==t&&1!==this.frameTotal||(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn("Texture.frame missing: "+t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){void 0!==t&&null!==t&&1!==this.frameTotal||(t="__BASE");var e,i=this.frames[t];return i?e=i.sourceIndex:(console.warn("Texture.frame missing: "+t),e=this.frames.__BASE.sourceIndex),this.dataSource[e].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new r(this,t[e],i.width,i.height))}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},destroy:function(){var t;for(t=0;t<this.source.length;t++)this.source[t].destroy();for(t=0;t<this.dataSource.length;t++)this.dataSource[t].destroy();for(var e in this.frames){this.frames[e].destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(124),r=i(181),o=i(16),a=i(935),h=i(934),l=i(1),u=i(329),c=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=s.INIT,this.sceneUpdate=l,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit(o.PRE_UPDATE,t,e),this.events.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),this.events.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit(o.RESUME,this,t)),this},sleep:function(t){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SLEEP,this,t),this},wake:function(t){var e=this.settings;return e.status=s.RUNNING,e.active=!0,e.visible=!0,this.events.emit(o.WAKE,this,t),e.isTransition&&this.events.emit(o.TRANSITION_WAKE,e.transitionFrom,e.transitionDuration),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isPaused:function(){return this.settings.status===s.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e<t.length;e++)this[t[e]]=null}});t.exports=c},function(t,e,i){var n=i(97);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e,i){var n={CENTER:i(349),ORIENTATION:i(348),SCALE_MODE:i(347),ZOOM:i(346)};t.exports=n},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(10);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,r,o=Number.MAX_VALUE,a=Number.MAX_VALUE,h=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,u=0;u<t.length;u++)i=t[u],Array.isArray(i)?(s=i[0],r=i[1]):(s=i.x,r=i.y),o=Math.min(o,s),a=Math.min(a,r),h=Math.max(h,s),l=Math.max(l,r);return e.x=o,e.y=a,e.width=h-o,e.height=l-a,e}},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*T,this.y=(e*o+i*u+n*p+m)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){var n=i(20);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e){t.exports=function(t,e,i,n,s){var r=.5*(n-e),o=.5*(s-i),a=t*t;return(2*i-2*n+r+o)*(t*a)+(-3*i+3*n-2*r-o)*a+r*t+i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){var n=i(99),s=i(128),r=i(24),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){o.canvas=!!window.CanvasRenderingContext2D||n.cocoonJS;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this);n.cocoonJS&&(t.screencanvas=!1);var e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d").createImageData(1,1);return a=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(o.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e,i){var n=i(402),s=i(401),r=i(400),o=i(399),a=i(398),h=i(397),l=i(396),u=i(395),c=i(394),d=i(393),f=i(392),p=i(391);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){var n=i(191);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(410),s=i(407),r=i(405),o=i(404);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var s=0;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1])},set:function(t,e){return this.has(t)||this.size++,this.entries[t]=e,this},get:function(t){if(this.has(t))return this.entries[t]},getArray:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},has:function(t){return this.entries.hasOwnProperty(t)},delete:function(t){return this.has(t)&&(delete this.entries[t],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(t){delete this.entries[t]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},dump:function(){var t=this.entries;for(var e in console.group("Map"),t)console.log(e,t[e]);console.groupEnd()},each:function(t){var e=this.entries;for(var i in e)if(!1===t(i,e[i]))break;return this},contains:function(t){var e=this.entries;for(var i in e)if(e[i]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i=this.entries,n=t.entries;for(var s in n)i.hasOwnProperty(s)&&e?i[s]=n[s]:this.set(s,n[s]);return this}});t.exports=n},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=i(6);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e,i){var n=i(6);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e){var i={defaultPipeline:null,pipeline:null,initPipeline:function(t){void 0===t&&(t="TextureTintPipeline");var e=this.scene.sys.game.renderer;return!!(e&&e.gl&&e.hasPipeline(t))&&(this.defaultPipeline=e.getPipeline(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer;return e&&e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=i},function(t,e,i){var n=i(6);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(6);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(58),s=i(6);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u<e;u++){var c=u/e,d=o+(h-o)*c,f=a+(l-a)*c;r.push(new s(d,f))}return r}},function(t,e,i){var n=i(135),s=i(6);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(23),s=i(0),r=i(11),o=i(136),a=i(434),h=i(433),l=i(4),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t<this.frames.length},completeAnimation:function(t){this.hideOnComplete&&(t.parent.visible=!1),t.stop()},getFirstTick:function(t,e){void 0===e&&(e=!0),t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration,e&&(t.nextTick+=t._delay)},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i){var n,s,r,o,a=[],u=1;if("string"==typeof e){o=e;var c=t.get(o).getFrameNames();e=[],c.forEach(function(t,i){e.push({key:o,frame:i})})}if(!Array.isArray(e)||0===e.length)return a;for(r=0;r<e.length;r++){var d=e[r],f=l(d,"key",i);if(f){var p=l(d,"frame",0),g=t.getFrame(f,p);(s=new h(f,p,u,g)).duration=l(d,"duration",0),s.isFirst=!n,n&&(n.nextFrame=s,s.prevFrame=n),a.push(s),n=s,u++}}if(a.length>0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r<a.length;r++)a[r].progress=r*v}return a},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},load:function(t,e){e>=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i<t;i++){var n=this.frames[i];n.index=i+1,n.isFirst=!1,n.isLast=!1,n.progress=i*e,0===i?(n.isFirst=!0,n.isLast=1===t,n.prevFrame=this.frames[t-1],n.nextFrame=this.frames[i+1]):i===t-1?(n.isLast=!0,n.prevFrame=this.frames[t-2],n.nextFrame=this.frames[0]):t>1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=u},function(t,e,i){var n=i(6);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),s=Math.random()+Math.random(),r=s>1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(6);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n={};t.exports=n;var s=i(82),r=i(87),o=i(238),a=i(86),h=i(546),l=i(36);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,s=r.magnitude(r.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e<t.length;e+=1){var i=t[e],n=i.constraintImpulse;i.isStatic||0===n.x&&0===n.y&&0===n.angle||(i.position.x+=n.x,i.position.y+=n.y,i.angle+=n.angle)}},n.solveAll=function(t,e){for(var i=0;i<t.length;i+=1){var s=t[i],r=!s.bodyA||s.bodyA&&s.bodyA.isStatic,o=!s.bodyB||s.bodyB&&s.bodyB.isStatic;(r||o)&&n.solve(t[i],e)}for(i=0;i<t.length;i+=1)r=!(s=t[i]).bodyA||s.bodyA&&s.bodyA.isStatic,o=!s.bodyB||s.bodyB&&s.bodyB.isStatic,r||o||n.solve(t[i],e)},n.solve=function(t,e){var i=t.bodyA,s=t.bodyB,o=t.pointA,a=t.pointB;if(i||s){i&&!i.isStatic&&(r.rotate(o,i.angle-t.angleA,o),t.angleA=i.angle),s&&!s.isStatic&&(r.rotate(a,s.angle-t.angleB,a),t.angleB=s.angle);var h=o,l=a;if(i&&(h=r.add(i.position,o)),s&&(l=r.add(s.position,a)),h&&l){var u=r.sub(h,l),c=r.magnitude(u);c<n._minLength&&(c=n._minLength);var d,f,p,g,v,y=(c-t.length)/c,m=t.stiffness<1?t.stiffness*e:t.stiffness,x=r.mult(u,y*m),T=(i?i.inverseMass:0)+(s?s.inverseMass:0),w=T+((i?i.inverseInertia:0)+(s?s.inverseInertia:0));if(t.damping){var b=r.create();p=r.div(u,c),v=r.sub(s&&r.sub(s.position,s.positionPrev)||b,i&&r.sub(i.position,i.positionPrev)||b),g=r.dot(p,v)}i&&!i.isStatic&&(f=i.inverseMass/T,i.constraintImpulse.x-=x.x*f,i.constraintImpulse.y-=x.y*f,i.position.x-=x.x*f,i.position.y-=x.y*f,t.damping&&(i.positionPrev.x-=t.damping*p.x*g*f,i.positionPrev.y-=t.damping*p.y*g*f),d=r.cross(o,x)/w*n._torqueDampen*i.inverseInertia*(1-t.angularStiffness),i.constraintImpulse.angle-=d,i.angle-=d),s&&!s.isStatic&&(f=s.inverseMass/T,s.constraintImpulse.x+=x.x*f,s.constraintImpulse.y+=x.y*f,s.position.x+=x.x*f,s.position.y+=x.y*f,t.damping&&(s.positionPrev.x+=t.damping*p.x*g*f,s.positionPrev.y+=t.damping*p.y*g*f),d=r.cross(a,x)/w*n._torqueDampen*s.inverseInertia*(1-t.angularStiffness),s.constraintImpulse.angle+=d,s.angle+=d)}}},n.postSolveAll=function(t){for(var e=0;e<t.length;e++){var i=t[e],l=i.constraintImpulse;if(!(i.isStatic||0===l.x&&0===l.y&&0===l.angle)){o.set(i,!1);for(var u=0;u<i.parts.length;u++){var c=i.parts[u];s.translate(c.vertices,l),u>0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e,i){var n={};t.exports=n;var s=i(36);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r<s.length;r++)n=s[r],t.events=t.events||{},t.events[n]=t.events[n]||[],t.events[n].push(i);return i},n.off=function(t,e,i){if(e){"function"==typeof e&&(i=e,e=s.keys(t.events).join(" "));for(var n=e.split(" "),r=0;r<n.length;r++){var o=t.events[n[r]],a=[];if(i&&o)for(var h=0;h<o.length;h++)o[h]!==i&&a.push(o[h]);t.events[n[r]]=a}}else t.events={}},n.trigger=function(t,e,i){var n,r,o,a,h=t.events;if(h&&s.keys(h).length>0){i||(i={}),n=e.split(" ");for(var l=0;l<n.length;l++)if(o=h[r=n[l]]){(a=s.clone(i,!1)).name=r,a.source=t;for(var u=0;u<o.length;u++)o[u].apply(t,[a])}}}},function(t,e,i){var n=i(0),s=i(71),r=i(2),o=i(1041),a=i(1040),h=i(1039),l=i(41),u=i(9),c=i(212),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d<l-1;d++){if(c=h[d],t=h[d+1],c.textures.length>0){for(e=0;e<c.textures.length;++e)(i=c.textures[e])&&a.setTexture2D(i,1+e,!1);n.activeTexture(n.TEXTURE0)}u=t.first-c.first,null===c.texture||u<=0||(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u))}if((c=h[l-1]).textures.length>0){for(e=0;e<c.textures.length;++e)(i=c.textures[e])&&a.setTexture2D(i,1+e,!1);n.activeTexture(n.TEXTURE0)}return u=s-c.first,c.texture&&u>0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,y=-t.displayOriginX+f,m=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,d=x.v1,g=x.width,v=x.height,f=x.x,p=x.y,y=-t.displayOriginX+f,m=-t.displayOriginY+p}t.flipX&&(y+=g,g*=-1),t.flipY&&(m+=v,v*=-1);var T=y+g,w=m+v;s.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var b=r.getX(y,m),S=r.getY(y,m),_=r.getX(y,w),A=r.getY(y,w),E=r.getX(T,w),C=r.getY(T,w),M=r.getX(T,m),P=r.getY(T,m),O=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),R=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),L=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),D=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(b=Math.round(b),S=Math.round(S),_=Math.round(_),A=Math.round(A),E=Math.round(E),C=Math.round(C),M=Math.round(M),P=Math.round(P)),this.setTexture2D(a,0);var F=t._isTinted&&t.tintFill;this.batchQuad(b,S,_,A,E,C,M,P,h,l,c,d,O,R,L,D,F,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(y,m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var y=this.vertexViewF32,m=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return y[++x]=t,y[++x]=e,y[++x]=o,y[++x]=a,y[++x]=f,m[++x]=u,y[++x]=i,y[++x]=n,y[++x]=o,y[++x]=l,y[++x]=f,m[++x]=c,y[++x]=s,y[++x]=r,y[++x]=h,y[++x]=l,y[++x]=f,m[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,T,w,b,S,_,A,E,C,M,P,O){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,F=y/i+E,k=m/n+C,I=(y+x)/i+E,B=(m+T)/n+C,Y=o,N=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;Y=U.width,N=U.height,o=U.width,a=U.height;var G=y=U.x,W=m=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),F=G/i+E,k=W/n+C,I=(G+U.width)/i+E,B=(W+U.height)/n+C,X=-g+y,z=-v+m}d^=!O&&e.isRenderTexture?1:0,c&&(Y*=-1,X+=o),d&&(N*=-1,z+=a);var V=X+Y,H=z+N;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,z),tt=D.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,F,k,I,B,w,b,S,_,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),y=h.getY(l,c),m=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,y,m,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),y=this.currentFrame,m=y.u0,x=y.v0,T=y.u1,w=y.v1;this.batchQuad(l,u,c,d,f,p,g,v,m,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,y=g.v0,m=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,y,m,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f<a;++f)o=t[f],h.push(o.x,o.y);a=(r=s(h)).length;for(var p=this.currentFrame,g=0;g<a;g+=3){var v=2*r[g+0],y=2*r[g+1],m=2*r[g+2],x=h[v+0],T=h[v+1],w=h[y+0],b=h[y+1],S=h[m+0],_=h[m+1],A=n.getX(x,T),E=n.getY(x,T),C=n.getX(w,b),M=n.getY(w,b),P=n.getX(S,_),O=n.getY(S,_),R=p.u0,L=p.v0,D=p.u1,F=p.v1;this.batchTri(A,E,C,M,P,O,R,L,D,F,l,u,c,d)}h.length=0},batchStrokePath:function(t,e,i,n,s){this.renderer.setPipeline(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var r=t.length-1,o=0;o<r;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===r-1,n,s)}},batchLine:function(t,e,i,n,s,r,o,a,h,l,u){this.renderer.setPipeline(this);var c=this._tempMatrix3;u&&u.multiply(l,c);var d=i-t,f=n-e,p=Math.sqrt(d*d+f*f),g=s*(n-e)/p,v=s*(t-i)/p,y=r*(n-e)/p,m=r*(t-i)/p,x=i-y,T=n-m,w=t-g,b=e-v,S=i+y,_=n+m,A=t+g,E=e+v,C=c.getX(x,T),M=c.getY(x,T),P=c.getX(w,b),O=c.getY(w,b),R=c.getX(S,_),L=c.getY(S,_),D=c.getX(A,E),F=c.getY(A,E),k=this.strokeTint,I=this.tintEffect,B=k.TL,Y=k.TR,N=k.BL,X=k.BR,z=this.currentFrame,U=z.u0,G=z.v0,W=z.u1,V=z.v1;if(this.batchQuad(D,F,P,O,C,M,R,L,U,G,W,V,B,Y,N,X,I),!(o<=2)){var H=this.prevQuad,j=this.firstQuad;a>0&&H[4]?this.batchQuad(D,F,P,O,H[0],H[1],H[2],H[3],U,G,W,V,B,Y,N,X,I):(j[0]=D,j[1]=F,j[2]=P,j[3]=O,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,V,B,Y,N,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(9),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o<i.length;++o){var a=i[o],h=t.getAttribLocation(n,a.name);h>=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(475),TIMELINE_LOOP:i(474),TIMELINE_PAUSE:i(473),TIMELINE_RESUME:i(472),TIMELINE_START:i(471),TIMELINE_UPDATE:i(470)}},function(t,e,i){var n=i(0),s=i(11),r=i(216),o=i(104),a=i(89),h=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING_ADD,this._pausedState=a.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===a.ACTIVE},add:function(t){return this.queue(o(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n<this.totalData;n++){var s=this.data[n];s.init(),this.hasOffset(s)?this.isOffsetAbsolute(s.offset)?(s.calculatedOffset=s.offset,0===s.offset&&(i=0)):this.isOffsetRelative(s.offset)&&(s.calculatedOffset=this.getRelativeOffset(s.offset,t)):s.calculatedOffset=i,t=s.totalDuration+s.calculatedOffset,e+=s.totalDuration,i+=s.totalDuration}this.duration=e,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e<this.totalData;e++){this.data[e].play(t)}},setCallback:function(t,e,i,n){return-1!==h.TYPES.indexOf(t)&&(this.callbacks[t]={func:e,scope:n,params:i}),this},makeActive:function(t){return this.manager.makeActive(t)},play:function(){if(this.state!==a.ACTIVE){if(this.paused)return this.paused=!1,void this.manager.makeActive(this);this.resetTweens(!1),this.state=a.ACTIVE;var t=this.callbacks.onStart;t&&t.func.apply(t.scope,t.params),this.emit(r.TIMELINE_START,this)}},nextState:function(){if(this.loopCounter>0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit(r.TIMELINE_LOOP,this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{this.state=a.PENDING_REMOVE;var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit(r.TIMELINE_COMPLETE,this)}},update:function(t,e){if(this.state!==a.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var n=this.totalData,s=0;s<this.totalData;s++){this.data[s].update(t,i)&&n--}var o=this.callbacks.onUpdate;o&&o.func.apply(o.scope,o.params),this.emit(r.TIMELINE_UPDATE,this),0===n&&this.nextState();break;case a.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.ACTIVE);break;case a.COMPLETE_DELAY:if(this.countdown-=e,this.countdown<=0){this.state=a.PENDING_REMOVE;var h=this.callbacks.onComplete;h&&h.func.apply(h.scope,h.params),this.emit(r.TIMELINE_COMPLETE,this)}}return this.state===a.PENDING_REMOVE}},stop:function(){this.state=a.PENDING_REMOVE},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this.emit(r.TIMELINE_PAUSE,this),this},resume:function(){return this.state===a.PAUSED&&(this.paused=!1,this.state=this._pausedState),this.emit(r.TIMELINE_RESUME,this),this},hasTarget:function(t){for(var e=0;e<this.data.length;e++)if(this.data[e].hasTarget(t))return!0;return!1},destroy:function(){for(var t=0;t<this.data.length;t++)this.data[t].stop()}});h.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],t.exports=h},function(t,e,i){var n=i(70),s=i(141),r=i(12),o=i(90),a=i(92),h=i(105),l=i(143),u=i(220),c=i(4),d=i(217),f=i(104);t.exports=function(t,e){var i=new d(t),p=u(e);if(0===p.length)return i.paused=!0,i;var g=n(s);g.targets=l(e);var v=r(e,"totalDuration",0);g.duration=v>0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y<p.length;y++)i.queue(f(i,p[y],g));i.completeDelay=r(e,"completeDelay",0),i.loop=Math.round(r(e,"loop",0)),i.loopDelay=Math.round(r(e,"loopDelay",0)),i.paused=o(e,"paused",!1),i.useFrames=o(e,"useFrames",!1);var m=c(e,"callbackScope",i),x=[i],T=c(e,"onStart",!1);if(T){var w=c(e,"onStartScope",m),b=c(e,"onStartParams",[]);i.setCallback("onStart",T,x.concat(b),w)}var S=c(e,"onUpdate",!1);if(S){var _=c(e,"onUpdateScope",m),A=c(e,"onUpdateParams",[]);i.setCallback("onUpdate",S,x.concat(A),_)}var E=c(e,"onLoop",!1);if(E){var C=c(e,"onLoopScope",m),M=c(e,"onLoopParams",[]);i.setCallback("onLoop",E,x.concat(M),C)}var P=c(e,"onYoyo",!1);if(P){var O=c(e,"onYoyoScope",m),R=c(e,"onYoyoParams",[]);i.setCallback("onYoyo",P,x.concat(null,R),O)}var L=c(e,"onComplete",!1);if(L){var D=c(e,"onCompleteScope",m),F=c(e,"onCompleteParams",[]);i.setCallback("onComplete",L,x.concat(F),D)}return i}},function(t,e,i){var n=i(141),s=i(12),r=i(90),o=i(92),a=i(105),h=i(4),l=i(142),u=i(140),c=i(139);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),S=[],_=l("value",f),A=c(p[0],"value",_.getEnd,_.getStart,m,g,v,b,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,S.push(A);var E=new u(t,S,p);E.offset=s(e,"offset",null),E.completeDelay=s(e,"completeDelay",0),E.loop=Math.round(s(e,"loop",0)),E.loopDelay=Math.round(s(e,"loopDelay",0)),E.paused=r(e,"paused",!1),E.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",E),M=[E,null],P=u.TYPES,O=0;O<P.length;O++){var R=P[O],L=h(e,R,!1);if(L){var D=h(e,R+"Scope",C),F=h(e,R+"Params",[]);E.setCallback(R,L,M.concat(F),D)}}return E}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(476);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){return this.delay=s(t,"delay",0),this.repeat=s(t,"repeat",0),this.loop=s(t,"loop",!1),this.callback=s(t,"callback",void 0),this.callbackScope=s(t,"callbackScope",this.callback),this.args=s(t,"args",[]),this.timeScale=s(t,"timeScale",1),this.startAt=s(t,"startAt",0),this.paused=s(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(0),s=i(13),r=i(28),o=i(18),a=i(485),h=i(110),l=i(41),u=i(9),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.config.renderType===r.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var r=t[s];if("string"==typeof r&&(r=n.getTileset(r)),r){i.push(r);for(var o=r.firstgid,a=0;a<r.total;a++)e[o+a]=r}}this.gidMap=e,this.tileset=i},updateVBOData:function(){for(var t=0;t<this.tileset.length;t++)this.dirty[t]=!0,this.vertexCount[t]=0,this.vertexBuffer[t]=null,this.bufferData[t]=null,this.vertexViewF32[t]=null,this.vertexViewU32[t]=null;return this},upload:function(t,e){var i=this.renderer,n=i.gl,s=i.pipelines.TextureTintPipeline;if(this.dirty[e]){var r,o,a,h=this.tileset[e],l=this.layer.width,u=this.layer.height,c=h.image.source[0].width,d=h.image.source[0].height,f=this.layer.data,p=this._renderOrder,g=h.firstgid,v=h.firstgid+h.total,y=this.vertexBuffer[e],m=this.bufferData[e],x=-1,T=l*u*s.vertexSize*6;if(this.vertexCount[e]=0,null===m&&(m=new ArrayBuffer(T),this.bufferData[e]=m,this.vertexViewF32[e]=new Float32Array(m),this.vertexViewU32[e]=new Uint32Array(m)),0===p)for(o=0;o<u;o++)for(a=0;a<l;a++)!(r=f[o][a])||r.index<g||r.index>v||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o<u;o++)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.index<g||r.index>v||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;a<l;a++)!(r=f[o][a])||r.index<g||r.index>v||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.index<g||r.index>v||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===y?(y=i.createVertexBuffer(m,n.STATIC_DRAW),this.vertexBuffer[e]=y):(i.setVertexBuffer(y),n.bufferSubData(n.ARRAY_BUFFER,0,m))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,y=this._tempMatrix,m=-c,x=-d;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=m+h,w=x+l;y.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),S=y.getX(m,x),_=y.getY(m,x),A=y.getX(m,w),E=y.getY(m,w),C=y.getX(T,w),M=y.getY(T,w),P=y.getX(T,x),O=y.getY(T,x);r.roundPixels&&(S=Math.round(S),_=Math.round(_),A=Math.round(A),E=Math.round(E),C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=S,R[++t]=_,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=A,R[++t]=E,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=S,R[++t]=_,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=P,R[++t]=O,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e<this.tileset.length;e++)this.dirty[e]=!0}return this},calculateFacesAt:function(t,e){return h.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return h.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return h.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles)},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},findByIndex:function(t,e,i){return h.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return h.FindTile(t,e,i,n,s,r,o,this.layer)},filterTiles:function(t,e,i,n,s,r,o){return h.FilterTiles(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return h.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return h.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return h.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return h.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return h.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},getTilesWithinShape:function(t,e,i){return h.GetTilesWithinShape(t,e,i,this.layer)},hasTileAt:function(t,e){return h.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return h.HasTileAtWorldXY(t,e,i,this.layer)},renderDebug:function(t,e){return h.RenderDebug(t,e,this.layer),this},setCollision:function(t,e,i){return h.SetCollision(t,e,i,this.layer),this},setCollisionBetween:function(t,e,i,n){return h.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return h.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return h.SetCollisionByExclusion(t,e,i,this.layer),this},setTileIndexCallback:function(t,e,i){return h.SetTileIndexCallback(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return h.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return h.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return h.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return h.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return h.TileToWorldXY(t,e,i,n,this.layer)},worldToTileX:function(t,e,i){return h.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return h.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return h.WorldToTileXY(t,e,i,n,s,this.layer)},destroy:function(){this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null;for(var t=0;t<this.tileset.length;t++)this.dirty[t]=!0,this.vertexCount[t]=0,this.vertexBuffer[t]=null,this.bufferData[t]=null,this.vertexViewF32[t]=null,this.vertexViewU32[t]=null;this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this)}});t.exports=c},function(t,e,i){var n=i(0),s=i(13),r=i(488),o=i(18),a=i(110),h=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Transform,s.Visible,s.ScrollFactor,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DynamicTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.CullTiles,this._renderOrder=0,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,r),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline("TextureTintPipeline")},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var r=t[s];if("string"==typeof r&&(r=n.getTileset(r)),r){i.push(r);for(var o=r.firstgid,a=0;a<r.total;a++)e[o+a]=r}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return"string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(){this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this)},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i){return a.SetCollision(t,e,i,this.layer),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(34),r=i(224),o=i(19),a=i(31),h=i(84),l=i(373),u=i(223),c=i(61),d=i(110),f=i(106),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new f(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f<o;f++){u=[];for(var p=0;p<s;p++)u.push(new c(d,-1,p,f,a,l,this.tileWidth,this.tileHeight));d.data.push(u)}this.layers.push(d),this.currentLayerIndex=this.layers.length-1;var g=new r(this.scene,this,this.currentLayerIndex,e,i,n);return g.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(g),g},createDynamicLayer:function(t,e,i,n){var s=this.getLayerIndex(t);if(null===s)return console.warn("Invalid Tilemap Layer ID: "+t),null;if(this.layers[s].tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+t),null;this.currentLayerIndex=s,void 0===i&&this.layers[s].x&&(i=this.layers[s].x),void 0===n&&this.layers[s].y&&(n=this.layers[s].y);var o=new r(this.scene,this,s,e,i,n);return o.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(o),o},createFromObjects:function(t,e,i,n){void 0===i&&(i={}),void 0===n&&(n=this.scene);var r=this.getObjectLayer(t);if(r){for(var a=r.objects,h=[],u=0;u<a.length;u++){var c=!1,d=a[u];if((void 0!==d.gid&&"number"==typeof e&&d.gid===e||void 0!==d.id&&"number"==typeof e&&d.id===e||void 0!==d.name&&"string"==typeof e&&d.name===e)&&(c=!0),c){var f=o({},i,d.properties);f.x=d.x,f.y=d.y;var p=this.scene.make.sprite(f);p.name=d.name,d.width&&(p.displayWidth=d.width),d.height&&(p.displayHeight=d.height);var g={x:p.originX*p.displayWidth,y:(p.originY-1)*p.displayHeight};if(d.rotation){var v=s(d.rotation);l(g,v),p.rotation=v}for(var y in p.x+=g.x,p.y+=g.y,void 0===d.flippedHorizontal&&void 0===d.flippedVertical||p.setFlip(d.flippedHorizontal,d.flippedVertical),d.visible||(p.visible=!1),d.properties)p.hasOwnProperty(y)||p.setData(y,d.properties[y]);h.push(p)}}return h}console.warn("Cannot create from object. Invalid objectgroup name given: "+t)},createFromTiles:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:d.CreateFromTiles(t,e,i,n,s,r)},createStaticLayer:function(t,e,i,n){var s=this.getLayerIndex(t);if(null===s)return console.warn("Invalid Tilemap Layer ID: "+t),null;if(this.layers[s].tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+t),null;this.currentLayerIndex=s,void 0===i&&this.layers[s].x&&(i=this.layers[s].x),void 0===n&&this.layers[s].y&&(n=this.layers[s].y);var r=new u(this.scene,this,s,e,i,n);return r.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(r),r},destroy:function(){this.removeAllLayers(),this.tilesets.length=0,this.objects.length=0,this.scene=void 0},fill:function(t,e,i,n,s,r,o){return o=this.getLayer(o),this._isStaticCall(o,"fill")?this:(null!==o&&d.Fill(t,e,i,n,s,r,o),this)},filterObjects:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.filter(e,i)},filterTiles:function(t,e,i,n,s,r,o,a){return null===(a=this.getLayer(a))?null:d.FilterTiles(t,e,i,n,s,r,o,a)},findByIndex:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.FindByIndex(t,e,i,n)},findObject:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.find(e,i)||null},findTile:function(t,e,i,n,s,r,o,a){return null===(a=this.getLayer(a))?null:d.FindTile(t,e,i,n,s,r,o,a)},forEachTile:function(t,e,i,n,s,r,o,a){return null!==(a=this.getLayer(a))&&d.ForEachTile(t,e,i,n,s,r,o,a),this},getImageIndex:function(t){return this.getIndex(this.images,t)},getIndex:function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return i;return null},getLayer:function(t){var e=this.getLayerIndex(t);return null!==e?this.layers[e]:null},getObjectLayer:function(t){var e=this.getIndex(this.objects,t);return null!==e?this.objects[e]:null},getLayerIndex:function(t){return void 0===t?this.currentLayerIndex:"string"==typeof t?this.getLayerIndexByName(t):"number"==typeof t&&t<this.layers.length?t:t instanceof u||t instanceof r?t.layerIndex:null},getLayerIndexByName:function(t){return this.getIndex(this.layers,t)},getTileAt:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.GetTileAt(t,e,i,n)},getTileAtWorldXY:function(t,e,i,n,s){return null===(s=this.getLayer(s))?null:d.GetTileAtWorldXY(t,e,i,n,s)},getTilesWithin:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:d.GetTilesWithin(t,e,i,n,s,r)},getTilesWithinShape:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.GetTilesWithinShape(t,e,i,n)},getTilesWithinWorldXY:function(t,e,i,n,s,r,o){return null===(o=this.getLayer(o))?null:d.GetTilesWithinWorldXY(t,e,i,n,s,r,o)},getTileset:function(t){var e=this.getIndex(this.tilesets,t);return null!==e?this.tilesets[e]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:d.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.HasTileAtWorldXY(t,e,i,n)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(t){this.setLayer(t)}},putTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"putTileAt")?null:null===s?null:d.PutTileAt(t,e,i,n,s)},putTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"putTileAtWorldXY")?null:null===r?null:d.PutTileAtWorldXY(t,e,i,n,s,r)},putTilesAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"putTilesAt")?this:(null!==s&&d.PutTilesAt(t,e,i,n,s),this)},randomize:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"randomize")?this:(null!==r&&d.Randomize(t,e,i,n,s,r),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?this:(d.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,n,s){return null===(s=this.getLayer(s))?this:(d.CalculateFacesWithin(t,e,i,n,s),this)},removeAllLayers:function(){for(var t=0;t<this.layers.length;t++)this.layers[t].tilemapLayer&&this.layers[t].tilemapLayer.destroy();return this.layers.length=0,this.currentLayerIndex=0,this},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:d.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:d.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?this:(d.RenderDebug(t,e,i),this)},replaceByIndex:function(t,e,i,n,s,r,o){return o=this.getLayer(o),this._isStaticCall(o,"replaceByIndex")?this:(null!==o&&d.ReplaceByIndex(t,e,i,n,s,r,o),this)},setCollision:function(t,e,i,n){return null===(n=this.getLayer(n))?this:(d.SetCollision(t,e,i,n),this)},setCollisionBetween:function(t,e,i,n,s){return null===(s=this.getLayer(s))?this:(d.SetCollisionBetween(t,e,i,n,s),this)},setCollisionByProperty:function(t,e,i,n){return null===(n=this.getLayer(n))?this:(d.SetCollisionByProperty(t,e,i,n),this)},setCollisionByExclusion:function(t,e,i,n){return null===(n=this.getLayer(n))?this:(d.SetCollisionByExclusion(t,e,i,n),this)},setCollisionFromCollisionGroup:function(t,e,i){return null===(i=this.getLayer(i))?this:(d.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,n){return null===(n=this.getLayer(n))?this:(d.SetTileIndexCallback(t,e,i,n),this)},setTileLocationCallback:function(t,e,i,n,s,r,o){return null===(o=this.getLayer(o))?this:(d.SetTileLocationCallback(t,e,i,n,s,r,o),this)},setLayer:function(t){var e=this.getLayerIndex(t);return null!==e&&(this.currentLayerIndex=e),this},setBaseTileSize:function(t,e){this.tileWidth=t,this.tileHeight=e,this.widthInPixels=this.width*t,this.heightInPixels=this.height*e;for(var i=0;i<this.layers.length;i++){this.layers[i].baseTileWidth=t,this.layers[i].baseTileHeight=e;for(var n=this.layers[i].data,s=this.layers[i].width,r=this.layers[i].height,o=0;o<r;o++)for(var a=0;a<s;a++){var h=n[o][a];null!==h&&h.setSize(void 0,void 0,t,e)}}return this},setLayerTileSize:function(t,e,i){if(null===(i=this.getLayer(i)))return this;i.tileWidth=t,i.tileHeight=e;for(var n=i.data,s=i.width,r=i.height,o=0;o<r;o++)for(var a=0;a<s;a++){var h=n[o][a];null!==h&&h.setSize(t,e)}return this},shuffle:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"shuffle")?this:(null!==s&&d.Shuffle(t,e,i,n,s),this)},swapByIndex:function(t,e,i,n,s,r,o){return o=this.getLayer(o),this._isStaticCall(o,"swapByIndex")?this:(null!==o&&d.SwapByIndex(t,e,i,n,s,r,o),this)},tileToWorldX:function(t,e,i){return null===(i=this.getLayer(i))?null:d.TileToWorldX(t,e,i)},tileToWorldY:function(t,e,i){return null===(i=this.getLayer(i))?null:d.TileToWorldY(t,e,i)},tileToWorldXY:function(t,e,i,n,s){return null===(s=this.getLayer(s))?null:d.TileToWorldXY(t,e,i,n,s)},weightedRandomize:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"weightedRandomize")?this:(null!==r&&d.WeightedRandomize(t,e,i,n,s,r),this)},worldToTileX:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.WorldToTileX(t,e,i,n)},worldToTileY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.WorldToTileY(t,e,i,n)},worldToTileXY:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:d.WorldToTileXY(t,e,i,n,s,r)},_isStaticCall:function(t,e){return t.tilemapLayer instanceof u&&(console.warn(e+": You cannot change the tiles in a static tilemap layer"),!0)}});t.exports=p},function(t,e,i){var n=i(31),s=i(83),r=i(490),o=i(489);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;l<e.layer.length;l++)e.layer[l].width>a&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[])}});t.exports=r},function(t,e,i){var n=i(494),s=i(230),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?(a.ellipse=t.ellipse,a.width=t.width,a.height=t.height):t.text?(a.width=t.width,a.height=t.height,a.text=t.text):(a.rectangle=!0,a.width=t.width,a.height=t.height);return a}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e){return this.images.push({gid:t,image:e}),this.total++,this}});t.exports=n},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=i(31),s=i(83),r=i(498),o=i(496),a=i(495),h=i(493),l=i(492),u=i(491);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(31),s=i(145);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(145),r=i(232),o=i(231),a=i(226);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(61),s=i(85),r=i(148);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t]||null;return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(85);t.exports=function(t,e,i){if(n(t,e,i)){var s=i.data[e][t];return null!==s&&s.index>-1}return!1}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l<h.length;l++)h[l]&&h[l].index===t&&(h[l].index=e)}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(210);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s<t.length;s++){var r=t[s],o=r.speed*r.speed+r.angularSpeed*r.angularSpeed;if(0===r.force.x&&0===r.force.y){var a=Math.min(r.motion,o),h=Math.max(r.motion,o);r.motion=n._minBias*a+(1-n._minBias)*h,r.sleepThreshold>0&&r.motion<n._motionSleepThreshold*i?(r.sleepCounter+=1,r.sleepCounter>=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;s<t.length;s++){var r=t[s];if(r.isActive){var o=r.collision,a=o.bodyA.parent,h=o.bodyB.parent;if(!(a.isSleeping&&h.isSleeping||a.isStatic||h.isStatic)&&(a.isSleeping||h.isSleeping)){var l=a.isSleeping&&!a.isStatic?a:h,u=l===a?h:a;!l.isStatic&&u.motion>n._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e,i){var n=i(43),s=i(0),r=i(38),o=i(42),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y);var s=this.gameObject;return!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(317);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,s){s||(s=g(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var r,o=e;o<i;o++)r=t.children[o],h(s,t.leaf?n(r):r);return s}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s<r;s++)o=e.children[s],p(t,a=e.leaf?n(o):o)&&(e.leaf?i.push(o):f(t,a)?this._all(o,i):h.push(o));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!p(t,e))return!1;for(var n,s,r,o,a=[];e;){for(n=0,s=e.children.length;n<s;n++)if(r=e.children[n],p(t,o=e.leaf?i(r):r)){if(e.leaf||f(t,o))return!0;a.push(r)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var s=this.data;this.data=n,n=s}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(t,e){if(!t)return this;for(var i,n,s,o,a=this.data,h=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(s=r(t,a.children,e)))return a.children.splice(s,1),l.push(a),this._condense(l),this;o||a.leaf||!f(a,h)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,n){var s,r=i-e+1,a=this._maxEntries;if(r<=a)return o(s=g(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,n-1))),(s=g([])).leaf=!1,s.height=n;var h,l,u,c,d=Math.ceil(r/a),f=d*Math.ceil(Math.sqrt(a));for(v(t,e,i,f,this.compareMinX),h=e;h<=i;h+=f)for(v(t,h,u=Math.min(h+f-1,i),d,this.compareMinY),l=h;l<=u;l+=d)c=Math.min(l+d-1,u),s.children.push(this._build(t,l,c,n-1));return o(s,this.toBBox),s},_chooseSubtree:function(t,e,i,n){for(var s,r,o,a,h,l,u,d,f,p;n.push(e),!e.leaf&&n.length-1!==i;){for(u=d=1/0,s=0,r=e.children.length;s<r;s++)h=c(o=e.children[s]),f=t,p=o,(l=(Math.max(p.maxX,f.maxX)-Math.min(p.minX,f.minX))*(Math.max(p.maxY,f.maxY)-Math.min(p.minY,f.minY))-h)<d?(d=l,u=h<u?h:u,a=o):l===d&&h<u&&(u=h,a=o);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,s=i?t:n(t),r=[],o=this._chooseSubtree(s,this.data,e,r);for(o.children.push(t),h(o,s);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o<l?(l=o,d=n,u=h<u?h:u):o===l&&h<u&&(u=h,d=n);return d},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:l,s=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var s,r,o=this.toBBox,l=a(t,0,e,o),u=a(t,i-e,i,o),c=d(l)+d(u);for(s=e;s<i-e;s++)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);for(s=i-e-1;s>=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t<i.length;t++){e=i[t];var s=n.indexOf(e);-1!==s&&n.splice(s,1)}for(i.length=0,i=this._pending,t=0;t<i.length;t++)e=i[t],this._active.push(e);return i.length=0,this._toProcess=0,this._active},getActive:function(){return this._active},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});t.exports=n},function(t,e,i){var n=i(38);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(-(r=t.y-e.bottom)>o&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(38);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(-(r=t.x-e.width-e.x)>o&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){t.exports={COLLIDE:i(563),OVERLAP:i(562),PAUSE:i(561),RESUME:i(560),TILE_COLLIDE:i(559),TILE_OVERLAP:i(558),WORLD_BOUNDS:i(557)}},function(t,e,i){var n=i(43),s=i(0),r=i(38),o=i(248),a=i(183),h=i(10),l=i(42),u=i(3),c=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(e.x,e.y),this.prev=new u(e.x,e.y),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new u(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new u,this.newVelocity=new u,this.deltaMax=new u,this.acceleration=new u,this.allowDrag=!0,this.drag=new u,this.allowGravity=!0,this.gravity=new u,this.bounce=new u,this.worldBounce=null,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new u(1e4,1e4),this.maxSpeed=-1,this.friction=new u(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.physicsType=r.DYNAMIC_BODY,this._reset=!0,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._bounds=new h},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=a(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),o=Math.abs(e.scaleY);this._sx===r&&this._sy===o||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*o,this._sx=r,this._sy=o,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},update:function(t){this.wasTouching.none=this.touching.none,this.wasTouching.up=this.touching.up,this.wasTouching.down=this.touching.down,this.wasTouching.left=this.touching.left,this.wasTouching.right=this.touching.right,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.none=!0,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1,this.updateBounds();var e=this.transform;if(this.position.x=e.x+e.scaleX*(this.offset.x-e.displayOriginX),this.position.y=e.y+e.scaleY*(this.offset.y-e.displayOriginY),this.updateCenter(),this.rotation=e.rotation,this.preRotation=this.rotation,this._reset&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves){this.world.updateMotion(this,t);var i=this.velocity.x,n=this.velocity.y;this.newVelocity.set(i*t,n*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(n,i),this.speed=Math.sqrt(i*i+n*n),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(o.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y,this.moves&&(0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this._dx<0?this.facing=r.FACING_LEFT:this._dx>0&&(this.facing=r.FACING_RIGHT),this._dy<0?this.facing=r.FACING_UP:this._dy>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.x<e.x&&i.left?(t.x=e.x,this.velocity.x*=n,this.blocked.left=!0,this.blocked.none=!1):this.right>e.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.y<e.y&&i.up?(t.y=e.y,this.velocity.y*=s,this.blocked.up=!0,this.blocked.none=!1):this.bottom>e.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):l(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return void 0===t&&(t=!0),this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=c},function(t,e,i){var n=i(249),s=i(23),r=i(0),o=i(247),a=i(38),h=i(56),l=i(11),u=i(248),c=i(186),d=i(383),f=i(382),p=i(246),g=i(245),v=i(4),y=i(244),m=i(556),x=i(10),T=i(243),w=i(555),b=i(550),S=i(549),_=i(102),A=i(241),E=i(242),C=i(41),M=i(3),P=i(57),O=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new _,this.staticBodies=new _,this.pendingDestroy=new _,this.late=new _,this._late=!1,this.colliders=new y,this.gravity=new M(v(e,"gravity.x",0),v(e,"gravity.y",0)),this.bounds=new x(v(e,"x",0),v(e,"y",0),v(e,"width",t.sys.scale.width),v(e,"height",t.sys.scale.height)),this.checkCollision={up:v(e,"checkCollision.up",!0),down:v(e,"checkCollision.down",!0),left:v(e,"checkCollision.left",!0),right:v(e,"checkCollision.right",!0)},this.fps=v(e,"fps",60),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=v(e,"timeScale",1),this.OVERLAP_BIAS=v(e,"overlapBias",4),this.TILE_BIAS=v(e,"tileBias",16),this.forceX=v(e,"forceX",!1),this.isPaused=v(e,"isPaused",!1),this._total=0,this.drawDebug=v(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:v(e,"debugShowBody",!0),debugShowStaticBody:v(e,"debugShowStaticBody",!0),debugShowVelocity:v(e,"debugShowVelocity",!0),bodyDebugColor:v(e,"debugBodyColor",16711935),staticBodyDebugColor:v(e,"debugStaticBodyColor",255),velocityDebugColor:v(e,"debugVelocityColor",65280)},this.maxEntries=v(e,"maxEntries",16),this.useTree=v(e,"useTree",!0),this.tree=new T(this.maxEntries),this.staticTree=new T(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new C,this._tempMatrix2=new C,this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=a.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(n.isParent)for(var s=n.getChildren(),r=0;r<s.length;r++){var o=s[r];o.isParent?this.enable(o,e):this.enableBody(o,e)}else this.enableBody(n,e)}},enableBody:function(t,e){return void 0===e&&(e=a.DYNAMIC_BODY),t.body||(e===a.DYNAMIC_BODY?t.body=new n(this,t):e===a.STATIC_BODY&&(t.body=new A(this,t))),this.add(t.body),t},add:function(t){return t.physicsType===a.DYNAMIC_BODY?this.bodies.set(t):t.physicsType===a.STATIC_BODY&&(this.staticBodies.set(t),this.staticTree.insert(t)),t.enable=!0,t},disable:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.isParent)for(var n=i.getChildren(),s=0;s<n.length;s++){var r=n[s];r.isParent?this.disable(r):this.disableBody(r.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===a.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t),this.late.delete(t)):t.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t))},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},setBounds:function(t,e,i,n,s,r,o,a){return this.bounds.setTo(t,e,i,n),void 0!==s&&this.setBoundsCollision(s,r,o,a),this},setBoundsCollision:function(t,e,i,n){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),this.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit(u.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(u.RESUME),this},addCollider:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!1,t,e,i,n,s);return this.colliders.add(r),r},addOverlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!0,t,e,i,n,s);return this.colliders.add(r),r},removeCollider:function(t){return this.colliders.remove(t),this},setFPS:function(t){return this.fps=t,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i=0,n=this._frameTime,s=this._frameTimeMS*this.timeScale;for(this._elapsed+=e,this._late=!1;this._elapsed>=s;)this._elapsed-=s,i++,this.step(n);this.stepsLastFrame=i,this._late=!0}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e<s;e++)(i=n[e]).enable&&i.update(t);this.useTree&&(this.tree.clear(),this.tree.load(n));var r=this.colliders.update();for(e=0;e<r.length;e++){var o=r[e];o.active&&o.update()}for(s=n.length,e=0;e<s;e++)(i=n[e]).enable&&i.postUpdate()},postUpdate:function(){var t,e,i,n,s=this.bodies,r=this.staticBodies,o=this.pendingDestroy,h=this.late;if(h.size>0){for(n=(e=h.entries).length,t=0;t<n;t++)(i=e[t]).enable&&i.postUpdate();h.clear()}if(this._late=!1,n=(e=s.entries).length,this.drawDebug){var l=this.debugGraphic;for(l.clear(),t=0;t<n;t++)(i=e[t]).willDrawDebug()&&i.drawDebug(l);for(n=(e=r.entries).length,t=0;t<n;t++)(i=e[t]).willDrawDebug()&&i.drawDebug(l)}if(o.size>0){var u=this.tree,c=this.staticTree;for(n=(e=o.entries).length,t=0;t<n;t++)(i=e[t]).physicsType===a.DYNAMIC_BODY?(u.remove(i),s.delete(i),h.delete(i)):i.physicsType===a.STATIC_BODY&&(c.remove(i),r.delete(i)),i.world=void 0,i.gameObject=void 0;o.clear()}},updateMotion:function(t,e){t.allowRotation&&this.computeAngularVelocity(t,e),this.computeVelocity(t,e)},computeAngularVelocity:function(t,e){var i=t.angularVelocity,n=t.angularAcceleration,r=t.angularDrag,o=t.maxAngular;n?i+=n*e:t.allowDrag&&r&&(d(i-(r*=e),0,.1)?i-=r:f(i+r,0,.1)?i+=r:i=0);var a=(i=s(i,-o,o))-t.angularVelocity;t.angularVelocity+=a,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,n=t.acceleration.x,r=t.drag.x,o=t.maxVelocity.x,a=t.velocity.y,h=t.acceleration.y,l=t.drag.y,u=t.maxVelocity.y,p=t.speed,g=t.maxSpeed,v=t.allowDrag,y=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,a+=(this.gravity.y+t.gravity.y)*e),n?i+=n*e:v&&r&&(y?(i*=r,c(p,0,.001)&&(i=0)):d(i-(r*=e),0,.01)?i-=r:f(i+r,0,.01)?i+=r:i=0),h?a+=h*e:v&&l&&(y?(a*=l,c(p,0,.001)&&(a=0)):d(a-(l*=e),0,.01)?a-=l:f(a+l,0,.01)?a+=l:a=0),i=s(i,-o,o),a=s(a,-u,u),t.velocity.set(i,a),g>-1&&t.velocity.length()>g&&t.velocity.normalize().scale(g)},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.y<a.y||h.y>a.bottom)&&(h.x<a.x||h.x>a.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(l=b(t,e,s,this.OVERLAP_BIAS),this.intersects(t,e)&&(c=S(t,e,s,this.OVERLAP_BIAS))):(c=S(t,e,s,this.OVERLAP_BIAS),this.intersects(t,e)&&(l=b(t,e,s,this.OVERLAP_BIAS)));var d=l||c;return d&&(s?(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e):(this._late&&(this.late.set(t),this.late.set(e)),(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e))),d},separateCircle:function(t,e,i,n){p(t,e,!1,n),g(t,e,!1,n);var s=e.center.x-t.center.x,r=e.center.y-t.center.y,o=Math.atan2(r,s),a=0;if(t.isCircle!==e.isCircle){var l={x:e.isCircle?t.position.x:e.position.x,y:e.isCircle?t.position.y:e.position.y,right:e.isCircle?t.right:e.right,bottom:e.isCircle?t.bottom:e.bottom},c={x:t.isCircle?t.center.x:e.center.x,y:t.isCircle?t.center.y:e.center.y,radius:t.isCircle?t.halfWidth:e.halfWidth};c.y<l.y?c.x<l.x?a=h(c.x,c.y,l.x,l.y)-c.radius:c.x>l.right&&(a=h(c.x,c.y,l.right,l.y)-c.radius):c.y>l.bottom&&(c.x<l.x?a=h(c.x,c.y,l.x,l.bottom)-c.radius:c.x>l.right&&(a=h(c.x,c.y,l.right,l.bottom)-c.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==a;var d=t.velocity.x,f=t.velocity.y,v=t.mass,y=e.velocity.x,m=e.velocity.y,x=e.mass,T=d*Math.cos(o)+f*Math.sin(o),w=d*Math.sin(o)-f*Math.cos(o),b=y*Math.cos(o)+m*Math.sin(o),S=y*Math.sin(o)-m*Math.cos(o),_=((v-x)*T+2*x*b)/(v+x),A=(2*v*T+(x-v)*b)/(v+x);t.immovable||(t.velocity.x=(_*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+_*Math.sin(o))*t.bounce.y,d=t.velocity.x,f=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-S*Math.sin(o))*e.bounce.x,e.velocity.y=(S*Math.cos(o)+A*Math.sin(o))*e.bounce.y,y=e.velocity.x,m=e.velocity.y),Math.abs(o)<Math.PI/2?d>0&&!t.immovable&&y>d?t.velocity.x*=-1:y<0&&!e.immovable&&d<y?e.velocity.x*=-1:f>0&&!t.immovable&&m>f?t.velocity.y*=-1:m<0&&!e.immovable&&f<m&&(e.velocity.y*=-1):Math.abs(o)>Math.PI/2&&(d<0&&!t.immovable&&y<d?t.velocity.x*=-1:y>0&&!e.immovable&&d>y?e.velocity.x*=-1:f<0&&!t.immovable&&m<f?t.velocity.y*=-1:m>0&&!e.immovable&&d>m&&(e.velocity.y*=-1));var E=this._frameTime;return t.immovable||(t.x+=t.velocity.x*E-a*Math.cos(o),t.y+=t.velocity.y*E-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*E+a*Math.cos(o),e.y+=e.velocity.y*E+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),t.postUpdate(),e.postUpdate(),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o<e.length;o++)this.collideHandler(t,e[o],i,n,s,r);else if(a&&!h)for(o=0;o<t.length;o++)this.collideHandler(t[o],e,i,n,s,r);else for(o=0;o<t.length;o++)for(var l=0;l<e.length;l++)this.collideHandler(t[o],e[l],i,n,s,r);else this.collideHandler(t,e,i,n,s,r);return this._total>0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;o<h;o++)u!==(l=d[o])&&e.contains(l.gameObject)&&this.separate(u,l,n,s,r)&&(i&&i.call(s,u.gameObject,l.gameObject),this._total++)}else{var f=e.getChildren(),p=e.children.entries.indexOf(t);for(h=f.length,o=0;o<h;o++)(l=f[o].body)&&o!==p&&l.enable&&this.separate(u,l,n,s,r)&&(i&&i.call(s,u.gameObject,l.gameObject),this._total++)}},collideGroupVsTilemapLayer:function(t,e,i,n,s,r){var o=t.getChildren();if(0===o.length)return!1;for(var a=!1,h=0;h<o.length;h++)o[h].body&&this.collideSpriteVsTilemapLayer(o[h],e,i,n,s,r)&&(a=!0);return a},collideSpriteVsTilemapLayer:function(t,e,i,n,s,r){var o=t.body;if(!o.enable)return!1;var a=o.position.x,h=o.position.y,l=o.width,c=o.height,d=e.layer;if(d.tileWidth>d.baseTileWidth){var f=(d.tileWidth-d.baseTileWidth)*e.scaleX;a-=f,l+=f}d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var p,g=e.getTilesWithinWorldXY(a,h,l,c);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},y=0;y<g.length;y++)p=g[y],v.left=e.tileToWorldX(p.x),v.top=e.tileToWorldY(p.y),p.baseHeight!==p.height&&(v.top-=(p.height-p.baseHeight)*e.scaleY),v.right=v.left+p.width*e.scaleX,v.bottom=v.top+p.height*e.scaleY,E(v,o)&&(!n||n.call(s,t,p))&&m(p,t)&&(r||w(y,o,p,v,e,this.TILE_BIAS))&&(this._total++,i&&i.call(s,t,p),r&&o.onOverlap?this.emit(u.TILE_OVERLAP,o.gameObject,p,o):o.onCollide&&this.emit(u.TILE_COLLIDE,o.gameObject,p,o),o.postUpdate())},collideGroupVsGroup:function(t,e,i,n,s,r){if(0!==t.length&&0!==e.length)for(var o=t.getChildren(),a=0;a<o.length;a++)this.collideSpriteVsGroup(o[a],e,i,n,s,r)},wrap:function(t,e){t.body?this.wrapObject(t,e):t.getChildren?this.wrapArray(t.getChildren(),e):Array.isArray(t)?this.wrapArray(t,e):this.wrapObject(t,e)},wrapArray:function(t,e){for(var i=0;i<t.length;i++)this.wrapObject(t[i],e)},wrapObject:function(t,e){void 0===e&&(e=0),t.x=P(t.x,this.bounds.left-e,this.bounds.right+e),t.y=P(t.y,this.bounds.top-e,this.bounds.bottom+e)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.late.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null}});t.exports=O},function(t,e,i){var n=i(111),s=i(0),r=i(38),o=i(94),a=i(8),h=new s({Extends:o,initialize:function(t,e,i,s){i||s?a(i)?(s=i,i=null,s.createCallback=this.createCallbackHandler,s.removeCallback=this.removeCallbackHandler,s.createMultipleCallback=this.createMultipleCallbackHandler,s.classType=n):Array.isArray(i)&&a(i[0])&&(s=i,i=null,s.forEach(function(t){t.createCallback=this.createCallbackHandler,t.removeCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=n})):s={createCallback:this.createCallbackHandler,removeCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n},this.world=t,this.physicsType=r.STATIC_BODY,o.call(this,e,i,s)},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e<t.length;e++)t[e].body.reset();return this}});t.exports=h},function(t,e,i){var n=i(111),s=i(0),r=i(38),o=i(2),a=i(94),h=i(8),l=new s({Extends:a,initialize:function(t,e,i,s){i||s?h(i)?(s=i,i=null,s.createCallback=this.createCallbackHandler,s.removeCallback=this.removeCallbackHandler):Array.isArray(i)&&h(i[0])?(s=i,i=null,s.forEach(function(t){t.createCallback=this.createCallbackHandler,t.removeCallback=this.removeCallbackHandler})):s={createCallback:this.createCallbackHandler,removeCallback:this.removeCallbackHandler}:s={createCallback:this.createCallbackHandler,removeCallback:this.removeCallbackHandler},this.world=t,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setAllowDrag:o(s,"allowDrag",!0),setAllowGravity:o(s,"allowGravity",!0),setAllowRotation:o(s,"allowRotation",!0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setEnable:o(s,"enable",!0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s<n.length;s++)n[s].body.velocity.set(t+s*i,e+s*i);return this},setVelocityX:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.x=t+n*e;return this},setVelocityY:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.y=t+n*e;return this}});t.exports=l},function(t,e,i){t.exports={Acceleration:i(575),Angular:i(574),Bounce:i(573),Debug:i(572),Drag:i(571),Enable:i(570),Friction:i(569),Gravity:i(568),Immovable:i(567),Mass:i(566),Size:i(565),Velocity:i(564)}},function(t,e,i){var n=i(0),s=i(253),r=i(93),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){var n=i(254),s=i(111),r=i(0),o=i(38),a=i(252),h=i(251),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n){var s="txt";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(75),r=i(22),o=i(2),a=i(152),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n){if(h(e)){var s=e;e=o(s,"key"),n=o(s,"config",n)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};r.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t<this.data.length;t++){var e=this.data[t];e.oncanplaythrough=null,e.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(t){var e=t.target;e.oncanplaythrough=null,e.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var t=this.config&&this.config.instances||1;this.filesTotal=t,this.filesLoaded=0,this.percentComplete=0;for(var e=0;e<t;e++){var i=new Audio;i.dataset.name=this.key+("0"+e).slice(-2),i.dataset.used="false",this.locked?i.dataset.locked="true":(i.dataset.locked="false",i.preload="auto",i.oncanplaythrough=this.onProgress.bind(this),i.onerror=this.onError.bind(this)),this.data.push(i)}for(e=0;e<this.data.length;e++)(i=this.data[e]).src=a(this,this.loader.baseURL),this.locked||i.load();this.locked&&setTimeout(this.onLoad.bind(this))}});t.exports=l},function(t,e,i){var n=i(0),s=i(28),r=i(22),o=i(7),a=i(2),h=i(257),l=i(8),u=new n({Extends:r,initialize:function(t,e,i,n,s){if(l(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),s=a(o,"context",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:s}};r.call(this,t,h)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(e){t.data=e,t.onProcessComplete()},function(e){console.error("Error decoding audio: "+this.key+" - ",e?e.message:null),t.onProcessError()}),this.config.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?!c.webAudio||o&&o.disableWebAudio?new h(t,e,d,n):new u(t,e,d,s,r.sound.context):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n=a(e[i],"url",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return n;var s=n.match(/\.([a-zA-Z0-9]+)($|\?)/);if(s=a(e[i],"type",s?s[1]:"").toLowerCase(),t.device.audio[s])return{url:n,type:s}}return null},o.register("audio",function(t,e,i,n){var s,r=this.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return this;if(Array.isArray(t))for(var h=0;h<t.length;h++)(s=u.create(this,t[h]))&&this.addFile(s);else(s=u.create(this,t,e,i,n))&&this.addFile(s);return this}),t.exports=u},function(t,e,i){var n=i(151);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.requestedWith&&s.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t,s),s.onerror=t.onError.bind(t,s),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(113),r=i(2),o=i(611),a=i(609),h=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n<e.length;n++){var h=e[n];"string"==typeof h?this.keyCodes.push(h.toUpperCase().charCodeAt(0)):"number"==typeof h?this.keyCodes.push(h):h.hasOwnProperty("keyCode")&&this.keyCodes.push(h.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=r(i,"resetOnWrongKey",!0),this.maxKeyDelay=r(i,"maxKeyDelay",0),this.resetOnMatch=r(i,"resetOnMatch",!1),this.deleteOnMatch=r(i,"deleteOnMatch",!1);var l=this;this.onKeyDown=function(t){!l.matched&&l.enabled&&o(t,l)&&(l.manager.emit(s.COMBO_MATCH,l,t),l.resetOnMatch?a(l):l.deleteOnMatch&&l.destroy())},this.manager.on(s.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(s.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(11),r=i(113),o=new n({Extends:s,initialize:function(t){s.call(this),this.keyCode=t,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.preventDefault=!0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},destroy:function(){this.removeAllListeners(),this.originalEvent=null}});t.exports=o},function(t,e,i){var n=i(264),s=i(263),r=i(0),o=i(11),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r<e.buttons.length;r++)i.push(new s(this,r));this.buttons=i;var h=[];for(r=0;r<e.axes.length;r++)h.push(new n(this,r));this.axes=h,this.vibration=e.vibrationActuator;var l={value:0,pressed:!1};this._LCLeft=i[14]?i[14]:l,this._LCRight=i[15]?i[15]:l,this._LCTop=i[12]?i[12]:l,this._LCBottom=i[13]?i[13]:l,this._RCLeft=i[2]?i[2]:l,this._RCRight=i[1]?i[1]:l,this._RCTop=i[3]?i[3]:l,this._RCBottom=i[0]?i[0]:l,this._FBLeftTop=i[4]?i[4]:l,this._FBLeftBottom=i[6]?i[6]:l,this._FBRightTop=i[5]?i[5]:l,this._FBRightBottom=i[7]?i[7]:l;var u={value:0};this._HAxisLeft=h[0]?h[0]:u,this._VAxisLeft=h[1]?h[1]:u,this._HAxisRight=h[2]?h[2]:u,this._VAxisRight=h[3]?h[3]:u,this.leftStick=new a,this.rightStick=new a},getAxisTotal:function(){return this.axes.length},getAxisValue:function(t){return this.axes[t].getValue()},setAxisThreshold:function(t){for(var e=0;e<this.axes.length;e++)this.axes[e].threshold=t},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(t){return this.buttons[t].value},isButtonDown:function(t){return this.buttons[t].pressed},update:function(t){var e,i=this.buttons,n=t.buttons,s=i.length;for(e=0;e<s;e++)i[e].update(n[e].value);var r=this.axes,o=t.axes;for(s=r.length,e=0;e<s;e++)r[e].update(o[e]);s>=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t<this.buttons.length;t++)this.buttons[t].destroy();for(t=0;t<this.axes.length;t++)this.axes[t].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});t.exports=h},function(t,e,i){var n=i(0),s=i(153),r=new n({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});t.exports=n},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(6);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(6);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.x<t.right&&e.right>t.x&&e.right<t.right&&e.y>t.y&&e.y<t.bottom&&e.bottom>t.y&&e.bottom<t.bottom}},function(t,e,i){var n=i(10);n.Area=i(675),n.Ceil=i(674),n.CeilAll=i(673),n.CenterOn=i(189),n.Clone=i(672),n.Contains=i(42),n.ContainsPoint=i(671),n.ContainsRect=i(269),n.CopyFrom=i(670),n.Decompose=i(275),n.Equals=i(669),n.FitInside=i(668),n.FitOutside=i(667),n.Floor=i(666),n.FloorAll=i(665),n.FromPoints=i(180),n.GetAspectRatio=i(155),n.GetCenter=i(664),n.GetPoint=i(204),n.GetPoints=i(430),n.GetSize=i(663),n.Inflate=i(662),n.Intersection=i(661),n.MarchingAnts=i(419),n.MergePoints=i(660),n.MergeRect=i(659),n.MergeXY=i(658),n.Offset=i(657),n.OffsetPoint=i(656),n.Overlaps=i(655),n.Perimeter=i(135),n.PerimeterPoint=i(654),n.Random=i(201),n.RandomOutside=i(653),n.SameDimensions=i(652),n.Scale=i(651),n.Union=i(313),t.exports=n},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e,i){var n=i(20),s=i(57),r=i(73);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(43),s=new(i(6));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){t.exports={CircleToCircle:i(725),CircleToRectangle:i(724),GetRectangleIntersection:i(723),LineToCircle:i(277),LineToLine:i(115),LineToRectangle:i(722),PointToLine:i(276),PointToLineSegment:i(721),RectangleToRectangle:i(158),RectangleToTriangle:i(720),RectangleToValues:i(719),TriangleToCircle:i(718),TriangleToLine:i(717),TriangleToTriangle:i(716)}},function(t,e,i){t.exports={Circle:i(745),Ellipse:i(735),Intersects:i(278),Line:i(715),Point:i(694),Polygon:i(680),Rectangle:i(270),Triangle:i(650)}},function(t,e,i){var n=i(0),s=i(281),r=i(9),o=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1,this.maxLights=-1},enable:function(){return-1===this.maxLights&&(this.maxLights=this.scene.sys.game.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,r=t.y+t.height/2,o=(t.width+t.height)/2,a={x:0,y:0},h=t.matrix,l=this.systems.game.config.height;i.length=0;for(var u=0;u<n&&i.length<this.maxLights;u++){var c=e[u];h.transformPoint(c.x,c.y,a);var d=s-(a.x-t.scrollX*c.scrollFactorX*t.zoom),f=r-(l-(a.y-t.scrollY*c.scrollFactorY*t.zoom));Math.sqrt(d*d+f*f)<c.radius+o&&i.push(e[u])}return i},forEachLight:function(t){if(t){for(var e=this.lights,i=e.length,n=0;n<i;++n)t(e[n]);return this}},setAmbientColor:function(t){var e=r.getFloatsFromUintRGB(t);return this.ambientColor.r=e[0],this.ambientColor.g=e[1],this.ambientColor.b=e[2],this},getMaxVisibleLights:function(){return 10},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,o){var a,h=null;return t=void 0===t?0:t,e=void 0===e?0:e,n=void 0===n?16777215:n,i=void 0===i?100:i,o=void 0===o?1:o,a=r.getFloatsFromUintRGB(n),h=null,this.lightPool.length>0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(0),s=i(9),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(58),s=i(6);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;f<e;f++){var p=d*(f/e),g=0,v=new s;p<l?(g=p/l,v.x=o.x1+(o.x2-o.x1)*g,v.y=o.y1+(o.y2-o.y1)*g):p>l+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(6),s=i(58);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return c<h?(d=c/h,i.x=r.x1+(r.x2-r.x1)*d,i.y=r.y1+(r.y2-r.y1)*d):c>h+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(0),s=i(29),r=i(65),o=i(795),a=new n({Extends:s,Mixins:[o],initialize:function(t,e,i,n,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),s.call(this,t,"Triangle",new r(n,o,a,h,l,u));var f=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(f,p),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,n,s,r){return this.geom.setTo(t,e,i,n,s,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(798),s=i(0),r=i(71),o=i(29),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l<e;l++)t.push(a+Math.cos(s)*n,h+Math.sin(s)*n),s+=o,t.push(a+Math.cos(s)*i,h+Math.sin(s)*i),s+=o;return t.push(a,h+-n),this.pathIndexes=r(t),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(0),s=i(10),r=i(29),o=i(801),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e){var i=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var e,n=[],s=t.points;for(e=0;e<s.length;e++)n.push([s[e].x,s[e].y]);var r=[];for(n.length>0&&r.push(i([0,0],n[0])),e=0;e<n.length-1;e++){var o=n[e],a=n[e+1],h=o[0],l=o[1],u=a[0],c=a[1];r.push([.85*h+.15*u,.85*l+.15*c]),r.push([.15*h+.85*u,.15*l+.85*c])}return n.length>1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(58),s=i(59);t.exports=function(t){for(var e=t.points,i=0,r=0;r<e.length;r++){var o=e[r],a=e[(r+1)%e.length],h=new s(o.x,o.y,a.x,a.y);i+=n(h)}return i}},function(t,e,i){var n=i(58),s=i(59),r=i(288);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);e||(e=h/i);for(var l=0;l<e;l++)for(var u=h*(l/e),c=0,d=0;d<a.length;d++){var f=a[d],p=a[(d+1)%a.length],g=new s(f.x,f.y,p.x,p.y),v=n(g);if(!(u<c||u>c+v)){var y=g.getPoint((u-c)/v);o.push(y);break}c+=v}return o}},function(t,e,i){var n=i(10);t.exports=function(t,e){void 0===e&&(e=new n);for(var i,s=1/0,r=1/0,o=-s,a=-r,h=0;h<t.points.length;h++)i=t.points[h],s=Math.min(s,i.x),r=Math.min(r,i.y),o=Math.max(o,i.x),a=Math.max(a,i.y);return e.x=s,e.y=r,e.width=o-s,e.height=a-r,e}},function(t,e,i){var n=i(804),s=i(0),r=i(71),o=i(290),a=i(161),h=i(29),l=i(287),u=new s({Extends:h,Mixins:[n],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==s&&this.setFillStyle(s,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e<t;e++)l(this.geom);return this.updateData()},updateData:function(){for(var t=[],e=this.geom.points,i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=r(t),this.pathData=t,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(29),r=i(59),o=i(807),a=new n({Extends:s,Mixins:[o],initialize:function(t,e,i,n,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),s.call(this,t,"Line",new r(n,o,a,h));var c=this.geom.right-this.geom.left,d=this.geom.bottom-this.geom.top;this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}});t.exports=a},function(t,e,i){var n=i(0),s=i(810),r=i(29),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===s&&(s=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,s),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},function(t,e,i){var n=i(813),s=i(0),r=i(29),o=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,n,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===s&&(s=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,s),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},function(t,e,i){var n=i(0),s=i(29),r=i(816),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),s.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(n,r),void 0!==h&&this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},function(t,e,i){var n=i(0),s=i(71),r=i(819),o=i(96),a=i(29),h=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,s,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=128),a.call(this,t,"Ellipse",new o(n/2,s/2,n,s)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=s,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=s(t),this.pathData=t,this}});t.exports=h},function(t,e,i){var n=i(0),s=i(822),r=i(71),o=i(10),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;s<n.length;s++)i.push(n[s].x,n[s].y);return i.push(n[0].x,n[0].y),this.pathIndexes=r(i),this.pathData=i,this}});t.exports=h},function(t,e,i){var n=i(825),s=i(0),r=i(34),o=i(71),a=i(77),h=i(20),l=i(29),u=new s({Extends:l,Mixins:[n],initialize:function(t,e,i,n,s,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,n)),this._startAngle=s,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i),this.setSize(this.geom.radius,this.geom.radius),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t,this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,n=r(this._startAngle),s=r(this._endAngle),a=i/2,l=i/2;s-=n,this._anticlockwise?s<-h.PI2?s=-h.PI2:s>0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},function(t,e,i){var n=i(0),s=i(34),r=i(90),o=i(4),a=i(67),h=i(89),l=i(3),u=new n({Extends:a,initialize:function(t,e,i,n,s,r){a.call(this,t,i,n,s,r),this.path=e,this.rotateToPath=!1,this.pathRotationOffset=0,this.pathOffset=new l(i,n),this.pathVector=new l,this.pathTween,this.pathConfig=null,this._prevDirection=h.PLAYING_FORWARD},setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=0,t.to=1;var n=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var a=o(t,"startAt",e);if(a&&(t.onStart=function(t){var e=t.data[0];e.progress=a,e.elapsed=e.duration*a;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=h.PLAYING_FORWARD,this.rotateToPath){var l=this.path.getPoint(.1);this.rotation=Math.atan2(l.y-this.y,l.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},preUpdate:function(t,e){this.anims.update(t,e);var i=this.pathTween;if(i){var n=i.data[0];if(n.state!==h.PLAYING_FORWARD&&n.state!==h.PLAYING_BACKWARD)return;var r=this.pathVector;this.path.getPoint(i.getValue(),r),r.add(this.pathOffset);var o=this.x,a=this.y;this.setPosition(r.x,r.y);var l=this.x-o,u=this.y-a;if(0===l&&0===u)return;if(n.state!==this._prevDirection)return void(this._prevDirection=n.state);this.rotateToPath&&(this.rotation=Math.atan2(u,l)+s(this.pathRotationOffset))}}});t.exports=u},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._length<i&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(60),s=i(0),r=i(13),o=i(304),a=i(303),h=i(845),l=i(2),u=i(172),c=i(302),d=i(91),f=i(306),p=i(301),g=i(10),v=i(118),y=i(3),m=i(57),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0),this.y=new h(e,"y",0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3),this.angle=new h(e,"angle",{min:0,max:360}),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new y,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e<this.configFastMap.length;e++)i=this.configFastMap[e],d(t,i)&&(this[i]=l(t,i));for(e=0;e<this.configOpMap.length;e++)i=this.configOpMap[e],d(t,i)&&this[i].loadConfig(t);if(this.acceleration=0!==this.accelerationX.propertyValue||0!==this.accelerationY.propertyValue,this.moveTo=0!==this.moveToX.propertyValue||0!==this.moveToY.propertyValue,d(t,"speed")&&(this.speedX.loadConfig(t,"speed"),this.speedY=null),(c(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),d(t,"scale")&&(this.scaleX.loadConfig(t,"scale"),this.scaleY=null),d(t,"callbackScope")){var n=l(t,"callbackScope",null);this.emitCallbackScope=n,this.deathCallbackScope=n}return d(t,"emitZone")&&this.setEmitZone(t.emitZone),d(t,"deathZone")&&this.setDeathZone(t.deathZone),d(t,"bounds")&&this.setBounds(t.bounds),d(t,"followOffset")&&this.followOffset.setFromObject(l(t,"followOffset",0)),d(t,"frame")&&this.setFrame(t.frame),this},toJSON:function(t){void 0===t&&(t={});var e=0,i="";for(e=0;e<this.configFastMap.length;e++)t[i=this.configFastMap[e]]=this[i];for(e=0;e<this.configOpMap.length;e++)this[i=this.configOpMap[e]]&&(t[i]=this[i].toJSON());return this.speedY||(delete t.speedX,t.speed=this.speedX.toJSON()),this.scaleY||(delete t.scaleX,t.scale=this.scaleX.toJSON()),t},startFollow:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.follow=t,this.followOffset.set(e,i),this.trackVisible=n,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){if(1===this.frames.length)return this.defaultFrame;if(this.randomFrame)return u(this.frames);var t=this.frames[this.currentFrame];return this._frameCounter++,this._frameCounter===this.frameQuantity&&(this._frameCounter=0,this.currentFrame=m(this.currentFrame+1,0,this._frameLength)),t},setFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0,this._frameCounter=0;var n=typeof t;if(Array.isArray(t)||"string"===n||"number"===n)this.manager.setEmitterFrames(t,this);else if("object"===n){var s=t;(t=l(s,"frames",null))&&this.manager.setEmitterFrames(t,this);var r=l(s,"cycle",!1);this.randomFrame=!r,this.frameQuantity=l(s,"quantity",i)}return this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},setPosition:function(t,e){return this.x.onChange(t),this.y.onChange(e),this},setBounds:function(t,e,i,n){if("object"==typeof t){var s=t;t=s.x,e=s.y,i=d(s,"w")?s.w:s.width,n=d(s,"h")?s.h:s.height}return this.bounds?this.bounds.setTo(t,e,i,n):this.bounds=new g(t,e,i,n),this},setSpeedX:function(t){return this.speedX.onChange(t),this.radial=!1,this},setSpeedY:function(t){return this.speedY&&(this.speedY.onChange(t),this.radial=!1),this},setSpeed:function(t){return this.speedX.onChange(t),this.speedY=null,this.radial=!0,this},setScaleX:function(t){return this.scaleX.onChange(t),this},setScaleY:function(t){return this.scaleY.onChange(t),this},setScale:function(t){return this.scaleX.onChange(t),this.scaleY=null,this},setGravityX:function(t){return this.gravityX=t,this},setGravityY:function(t){return this.gravityY=t,this},setGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setAlpha:function(t){return this.alpha.onChange(t),this},setEmitterAngle:function(t){return this.angle.onChange(t),this},setAngle:function(t){return this.angle.onChange(t),this},setLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity.onChange(t),this},setFrequency:function(t,e){return this.frequency=t,this._counter=0,e&&this.quantity.onChange(e),this},setEmitZone:function(t){if(void 0===t)this.emitZone=null;else{var e=l(t,"type","random"),i=l(t,"source",null);switch(e){case"random":this.emitZone=new p(i);break;case"edge":var n=l(t,"quantity",1),s=l(t,"stepRate",0),r=l(t,"yoyo",!1),o=l(t,"seamless",!0);this.emitZone=new a(i,n,s,r,o)}}return this},setDeathZone:function(t){if(void 0===t)this.deathZone=null;else{var e=l(t,"type","onEnter"),i=l(t,"source",null);if(i&&"function"==typeof i.contains){var n="onEnter"===e;this.deathZone=new o(i,n)}}return this},reserve:function(t){for(var e=this.dead,i=0;i<t;i++)e.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s<n;++s)t.call(e,i[s],this);return this},forEachDead:function(t,e){for(var i=this.dead,n=i.length,s=0;s<n;++s)t.call(e,i[s],this);return this},start:function(){return this.on=!0,this._counter=0,this},stop:function(){return this.on=!1,this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},depthSort:function(){return v.inplace(this.alive,this.depthSortCallback),this},flow:function(t,e){return void 0===e&&(e=1),this.frequency=t,this.quantity.onChange(e),this.start()},explode:function(t,e,i){return this.frequency=-1,this.emitParticle(t,e,i)},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.quantity.onEmit());for(var n=this.dead,s=0;s<t;s++){var r=n.pop();if(r||(r=new this.particleClass(this)),r.fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);var n=this.manager.getProcessors(),s=this.alive,r=this.dead,o=0,a=[],h=s.length;for(o=0;o<h;o++){var l=s[o];l.update(e,i,n)&&a.push({index:o,particle:l})}if((h=a.length)>0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=i(0),s=i(34),r=i(56),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;u<n.length;u++)n[u].update(this,e,i)},checkBounds:function(t){var e=t.bounds,i=-this.bounce;this.x<e.x&&t.collideLeft?(this.x=e.x,this.velocityX*=i):this.x>e.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.y<e.y&&t.collideTop?(this.y=e.y,this.velocityY*=i):this.y>e.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s<this._epsilon&&(s=this._epsilon);var o=this._power*e/(s*r)*100;t.velocityX+=i*o,t.velocityY+=n*o}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(t){this._epsilon=t*t}},power:{get:function(){return this._power/this._gravity},set:function(t){this._power=t*this._gravity}},gravity:{get:function(){return this._gravity},set:function(t){var e=this.power;this._gravity=t,this.power=e}}});t.exports=r},function(t,e,i){var n=i(167),s=i(25);t.exports=function(t,e,i,r,o,a,h){var l=e.commandBuffer,u=l.length,c=a||t.currentContext;if(0!==u&&s(t,c,e,r,o)){var d=1,f=1,p=0,g=0,v=1,y=0,m=0,x=0;c.beginPath();for(var T=0;T<u;++T)switch(l[T]){case n.ARC:c.arc(l[T+1],l[T+2],l[T+3],l[T+4],l[T+5],l[T+6]),T+=7;break;case n.LINE_STYLE:v=l[T+1],p=l[T+2],d=l[T+3],y=(16711680&p)>>>16,m=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+y+","+m+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],y=(16711680&g)>>>16,m=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+y+","+m+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){var n=i(309),s=i(166),r=i(100),o=i(20);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h<e;h++){var l=r(h/e,0,o.PI2);a.push(s(t,l))}return a}},function(t,e,i){var n=i(166),s=i(100),r=i(20),o=i(6);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(0),s=i(13),r=i(18),o=i(857),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.Origin,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t){r.call(this,t,"Extern")},preUpdate:function(){},render:function(){}});t.exports=a},function(t,e,i){var n=i(10);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e){function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,s){void 0===e&&(e=0),void 0===n&&(n=0);var r={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=i(o,"size"),r.lineHeight=i(a,"lineHeight")+n,r.chars={};var h=t.getElementsByTagName("char"),l=void 0!==s&&s.trimmed;if(l)var u=s.height,c=s.width;for(var d=0;d<h.length;d++){var f=h[d],p=i(f,"id"),g=i(f,"x"),v=i(f,"y"),y=i(f,"width"),m=i(f,"height");l&&(g<c&&(c=g),v<u&&(u=v)),r.chars[p]={x:g,y:v,width:y,height:m,centerX:Math.floor(y/2),centerY:Math.floor(m/2),xOffset:i(f,"xoffset"),yOffset:i(f,"yoffset"),xAdvance:i(f,"xadvance")+e,data:{},kerning:{}}}if(l&&0!==u&&0!==c)for(var x in r.chars){var T=r.chars[x];T.x-=s.x,T.y-=s.y}var w=t.getElementsByTagName("kerning");for(d=0;d<w.length;d++){var b=w[d],S=i(b,"first"),_=i(b,"second"),A=i(b,"amount");r.chars[_].kerning[S]=A}return r}},function(t,e,i){var n=i(12);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.setDelay(a),s.setRepeat(h),s.setRepeatDelay(l),s.setYoyo(u),c?s.play(r,o):d>0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(4),s=i(132),r=function(t,e,i){for(var n=[],s=0;s<t.length;s++)for(var r=0;r<e.length;r++)for(var o=0;o<i;o++)n.push({a:t[s],b:e[r]});return n};t.exports=function(t,e,i){var o=n(i,"max",0),a=n(i,"qty",1),h=n(i,"random",!1),l=n(i,"randomB",!1),u=n(i,"repeat",0),c=n(i,"yoyo",!1),d=[];if(l&&s(e),-1===u)if(0===o)u=0;else{var f=t.length*e.length*a;c&&(f*=2),u=Math.ceil(o/f)}for(var p=0;p<=u;p++){var g=r(t,e,a);h&&s(g),d=d.concat(g),c&&(g.reverse(),d=d.concat(g))}return o&&d.splice(o),d}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return t<e?-1:t>e?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,y=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v<y;){for(i(t,v,y),v++,y--;a(t[v],g)<0;)v++;for(;a(t[y],g)>0;)y--}0===a(t[r],g)?i(t,r,y):i(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};t.exports=s},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s<i;s++){n[s]=new Array(e);for(var r=e-1;r>-1;r--)n[s][r]=t[r][s]}return n}},function(t,e,i){t.exports={AtlasXML:i(910),Canvas:i(909),Image:i(908),JSONArray:i(907),JSONHash:i(906),SpriteSheet:i(905),SpriteSheetFromAtlas:i(904),UnityYAML:i(903)}},function(t,e,i){var n=i(24),s=i(0),r=i(127),o=i(101),a=new s({initialize:function(t,e,i,n){var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=n||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&(this.glTexture=this.renderer.canvasToTexture(this.image,this.glTexture))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var n=i(24),s=i(911),r=i(0),o=i(32),a=i(28),h=i(11),l=i(126),u=i(26),c=i(361),d=i(4),f=i(319),p=i(175),g=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once(u.BOOT,this.boot,this)},boot:function(){this._pending=2,this.on(l.LOAD,this.updatePending,this),this.on(l.ERROR,this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once(u.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(l.LOAD),this.off(l.ERROR),this.emit(l.READY))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit(l.REMOVE,t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit(l.ERROR,t)},n.onload=function(){var e=i.create(t,n);f.Image(e,0),i.emit(l.ADD,t,e),i.emit(l.LOAD,t,e)},n.src=e}return this},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),f.Image(n,0),i&&n.setDataSource(i),this.emit(l.ADD,t,n)),n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit(l.ADD,t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,c(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit(l.ADD,t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o<s.source.length;o++){var a=r?i[0]:i[o];f.JSONArray(s,o,a)}else f.JSONArray(s,0,i);n&&s.setDataSource(n),this.emit(l.ADD,t,s)}return s},addAtlasJSONHash:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=0;r<i.length;r++)f.JSONHash(s,r,i[r]);else f.JSONHash(s,0,i);n&&s.setDataSource(n),this.emit(l.ADD,t,s)}return s},addAtlasXML:function(t,e,i,n){var s=null;return this.checkKey(t)&&(s=this.create(t,e),f.AtlasXML(s,0,i),n&&s.setDataSource(n),this.emit(l.ADD,t,s)),s},addUnityAtlas:function(t,e,i,n){var s=null;return this.checkKey(t)&&(s=this.create(t,e),f.UnityYAML(s,0,i),n&&s.setDataSource(n),this.emit(l.ADD,t,s)),s},addSpriteSheet:function(t,e,i){var n=null;if(this.checkKey(t)){var s=(n=this.create(t,e)).source[0].width,r=n.source[0].height;f.SpriteSheet(n,0,0,0,s,r,i),this.emit(l.ADD,t,n)}return n},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=d(e,"atlas",null),n=d(e,"frame",null);if(i&&n){var s=this.get(i).get(n);if(s){var r=this.create(t,s.source.image);return s.trimmed?f.SpriteSheetFromAtlas(r,s,e):f.SpriteSheet(r,0,s.cutX,s.cutY,s.cutWidth,s.cutHeight,e),this.emit(l.ADD,t,r),r}}},create:function(t,e,i,n){var s=null;return this.checkKey(t)&&(s=new p(this,t,e,i,n),this.list[t]=s),s},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return void 0===t&&(t="__DEFAULT"),this.list[t]?this.list[t]:this.list.__MISSING},cloneFrame:function(t,e){if(this.list[t])return this.list[t].get(e).clone()},getFrame:function(t,e){if(this.list[t])return this.list[t].get(e)},getTextureKeys:function(){var t=[];for(var e in this.list)"__DEFAULT"!==e&&"__MISSING"!==e&&t.push(e);return t},getPixel:function(t,e,i,n){var s=this.getFrame(i,n);if(s){t-=s.x,e-=s.y;var r=s.data.cut;if(t+=r.x,e+=r.y,t>=r.x&&t<r.r&&e>=r.y&&e<r.b){var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(s.source.image,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var s=this.getFrame(i,n);if(s){t-=s.x,e-=s.y;var r=s.data.cut;if(t+=r.x,e+=r.y,t>=r.x&&t<r.r&&e>=r.y&&e<r.b){var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(s.source.image,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[0]=this.list[s],t.apply(e,i)},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.game=null,n.remove(this._tempCanvas)}});t.exports=g},function(t,e,i){var n=i(122),s=i(0),r=i(69),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(r.PAUSE,this),!0))},resume:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!n.prototype.resume.call(this)&&(this.createAndStartBufferSource(),this.emit(r.RESUME,this),!0))},stop:function(){return!!n.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(r.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,i=this.manager.context.currentTime+e,n=(this.currentMarker?this.currentMarker.start:0)+t,s=this.duration-t;this.playTime=i-t,this.startTime=i,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,i),Math.max(0,n),Math.max(0,s)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,i=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,i))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(e){e.target===t.source&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1}),n.prototype.applyConfig.call(this)},update:function(t,e){this.hasEnded?(this.hasEnded=!1,n.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(r.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(r.LOOPED,this))},destroy:function(){n.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.rateUpdates.length=0,this.rateUpdates=null},calculateRate:function(){n.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&"number"==typeof this.totalRate&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++){t+=((e<this.rateUpdates.length-1?this.rateUpdates[e+1].time:this.manager.context.currentTime-this.playTime)-this.rateUpdates[e].time)*this.rateUpdates[e].rate}return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var i=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+i.time+(this.duration-t)/i.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit(r.RATE,this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit(r.DETUNE,this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return 0===this.muteNode.gain.value},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(t?0:1,0),this.emit(r.MUTE,this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit(r.VOLUME,this,t)}},setVolume:function(t){return this.volume=t,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit(r.LOOP,this,t)}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(123),s=i(0),r=i(69),o=i(322),a=new s({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function e(){t.context&&t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),document.body.removeEventListener("click",e),t.unlocked=!0})};document.body&&(document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1),document.body.addEventListener("click",e,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){this.locked||this.context.resume()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context)this.context.suspend();else{var t=this;this.context.close().then(function(){t.context=null})}n.prototype.destroy.call(this)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit(r.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit(r.GLOBAL_VOLUME,this,t)}}});t.exports=a},function(t,e,i){var n=i(122),s=i(0),r=i(11),o=i(19),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(123),s=i(0),r=i(11),o=i(324),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(122),s=i(0),r=i(69),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),this.tags?(this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!n.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if("false"===e.dataset.used)return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var i=[];this.manager.forEachActiveSound(function(t){t.key===this.key&&t.audio&&i.push(t)},this),i.sort(function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1});var n=i[0];return this.audio=n.audio,n.reset(),n.audio=null,n.startTime=0,n.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch(function(t){console.warn(t)})},stopAndReleaseAudioTag:function(){this.audio.pause(),this.audio.dataset.used="false",this.audio=null,this.startTime=0,this.previousTime=0},reset:function(){n.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(t,e){if(this.isPlaying)if(this.startTime>0)this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());else{var i=this.currentMarker?this.currentMarker.start:0,n=i+this.duration,s=this.audio.currentTime;if(this.currentConfig.loop)s>=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s<i&&(this.audio.currentTime+=i,s=this.audio.currentTime),s<this.previousTime&&this.emit(r.LOOPED,this);else if(s>=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(123),s=i(0),r=i(69),o=i(326),a=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var n=0;n<i.length;n++)if("true"===i[n].dataset.locked)return t.locked=!0,!1;return!0}),this.locked){var e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&s.push(n)}return!0}),0!==s.length){var r=s[s.length-1];r.oncanplaythrough=function(){r.oncanplaythrough=null,s.forEach(function(t){t.dataset.locked="false"}),t.unlocked=!0},s.forEach(function(t){t.load()})}}};this.once(r.UNLOCKED,function(){for(this.forEachActiveSound(function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration});this.lockedActionsQueue.length;){var t=this.lockedActionsQueue.shift();t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}},this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",n,!1)}},onBlur:function(){this.forEachActiveSound(function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(t){t.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){n.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,i){return"true"===t.tags[0].dataset.locked&&(this.lockedActionsQueue.push({sound:t,prop:e,value:i}),!0)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound(function(t){t.updateMute()}),this.emit(r.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound(function(t){t.updateVolume()}),this.emit(r.GLOBAL_VOLUME,this,t)}}});t.exports=a},function(t,e,i){var n=i(327),s=i(325),r=i(323),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(124),s=i(4),r=i(103),o=i(933),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:s(t,"pack",!1),cameras:s(t,"cameras",null),map:s(t,"map",r(o,s(t,"mapAdd",{}))),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1),input:s(t,"input",{})}}};t.exports=a},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(0),s=i(176),r=new n({initialize:function(t){this.sys=new s(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.impact,this.matter},update:function(){}});t.exports=r},function(t,e,i){var n=i(0),s=i(124),r=i(16),o=i(26),a=i(4),h=i(75),l=i(1),u=i(331),c=i(176),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)this._pending.push({key:"default",scene:e[i],autoStart:0===i,data:{}})}t.events.once(o.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){var t,e,i,n;for(t=0;t<this._pending.length;t++){var s;i=(e=this._pending[t]).key,(n=e.scene)instanceof u?s=this.createSceneFromInstance(i,n):"object"==typeof n?s=this.createSceneFromObject(i,n):"function"==typeof n&&(s=this.createSceneFromFunction(i,n)),i=s.sys.settings.key,this.keys[i]=s,this.scenes.push(s),this._data[i]&&(s.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||s.sys.settings.active)&&this._start.push(i)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0}},processQueue:function(){var t=this._pending.length,e=this._queue.length;if(0!==t||0!==e){var i,n;if(t){for(i=0;i<t;i++)n=this._pending[i],this.add(n.key,n.scene,n.autoStart,n.data);for(i=0;i<this._start.length;i++)n=this._start[i],this.start(n);return this._start.length=0,void(this._pending.length=0)}for(i=0;i<this._queue.length;i++)this[(n=this._queue[i]).op](n.keyA,n.keyB);this._queue.length=0}},add:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n={}),this.isProcessing||!this.isBooted?(this._pending.push({key:t,scene:e,autoStart:i,data:n}),this.isBooted||(this._data[t]={data:n}),null):(t=this.getKey(t,e),e instanceof u?s=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,s=this.createSceneFromObject(t,e)):"function"==typeof e&&(s=this.createSceneFromFunction(t,e)),s.sys.settings.data=n,t=s.sys.settings.key,this.keys[t]=s,this.scenes.push(s),(i||s.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),s);var s},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{var e=this.getScene(t);if(!e||e.sys.isTransitioning())return this;var i=this.scenes.indexOf(e),n=e.sys.settings.key;i>-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e<this.scenes.length;e++){var i=this.scenes[e].sys;i.settings.visible&&i.settings.status>=s.LOADING&&i.settings.status<s.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(i.status=s.CREATING,t.create.call(t,i.data)),i.isTransition&&e.events.emit(r.TRANSITION_START,i.transitionFrom,i.transitionDuration),t.update&&(e.sceneUpdate=t.update),i.status=s.RUNNING},createSceneFromFunction:function(t,e){var i=new e;if(i instanceof u){var n=i.sys.settings.key;if(""!==n&&(t=n),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,i)}return i.sys=new c(i),i.sys.settings.key=t,i.sys.init(this.game),i},createSceneFromInstance:function(t,e){var i=e.sys.settings.key;return""!==i?t=i:e.sys.settings.key=t,e.sys.init(this.game),e},createSceneFromObject:function(t,e){var i=new u(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var s=["init","preload","create","update","render"],r=0;r<s.length;r++){var o=a(e,s[r],null);o&&(i[s[r]]=o)}if(e.hasOwnProperty("extend"))for(var h in e.extend){var l=e.extend[h];"data"===h&&i.hasOwnProperty("data")&&"object"==typeof l?i.data.merge(l):"sys"!==h&&(i[h]=l)}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof u?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],n=this.scenes,s=0;s<n.length;s++){var r=n[s];r&&(!t||t&&r.sys.isActive())&&i.push(r)}return e?i.reverse():i},getScene:function(t){if("string"==typeof t){if(this.keys[t])return this.keys[t]}else for(var e=0;e<this.scenes.length;e++)if(t===this.scenes[e])return t;return null},isActive:function(t){var e=this.getScene(t);return e?e.sys.isActive():null},isVisible:function(t){var e=this.getScene(t);return e?e.sys.isVisible():null},isSleeping:function(t){var e=this.getScene(t);return e?e.sys.isSleeping():null},pause:function(t,e){var i=this.getScene(t);return i&&i.sys.pause(e),this},resume:function(t,e){var i=this.getScene(t);return i&&i.sys.resume(e),this},sleep:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.sleep(e),this},wake:function(t,e){var i=this.getScene(t);return i&&i.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var n=0;n<this._pending.length;n++)if(this._pending[n].key===t){this.queueOp("start",t,e);break}return this}i.sys.isSleeping()?i.sys.wake(e):i.sys.isBooted&&!i.sys.isActive()?i.sys.resume(e):this.start(t,e)},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i=this.getScene(t);if(i){var n;if(i.sys.isActive()||i.sys.isPaused())i.sys.shutdown(),i.sys.start(e);else if(i.sys.start(e),i.sys.load&&(n=i.sys.load),n&&i.sys.settings.hasOwnProperty("pack")&&(n.reset(),n.addPack({payload:i.sys.settings.pack})))return i.sys.settings.status=s.LOADING,n.once(h.COMPLETE,this.payloadComplete,this),n.start(),this;this.bootScene(i)}return this},stop:function(t){var e=this.getScene(t);return e&&!e.sys.isTransitioning()&&e.sys.shutdown(),this},switch:function(t,e){var i=this.getScene(t),n=this.getScene(e);return i&&n&&i!==n&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e<this.scenes.length){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.push(i)}}return this},sendToBack:function(t){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e>0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e<this.scenes.length-1){var i=e+1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveAbove:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i+1,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),0===i?this.scenes.unshift(s):this.scenes.splice(i,0,s)}}return this},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i!==n&&-1!==i&&-1!==n){var s=this.getAt(i);this.scenes[i]=this.scenes[n],this.scenes[n]=s}}return this},dump:function(){for(var t=[],e=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],i=0;i<this.scenes.length;i++){var n=this.scenes[i].sys,r=!n.settings.visible||n.settings.status!==s.RUNNING&&n.settings.status!==s.PAUSED?"[-] ":"[*] ";r+=n.settings.key+" ("+e[n.settings.status]+")",t.push(r)}console.log(t.join("\n"))},destroy:function(){for(var t=0;t<this.scenes.length;t++){this.scenes[t].sys.destroy()}this.update=l,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=d},function(t,e,i){var n=i(23),s=i(0),r=i(98),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio<s?(e=(t=r(t,n.x))/this.aspectRatio,n.y>0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatio<s||!i&&this.aspectRatio>s)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(951),FULLSCREEN_UNSUPPORTED:i(950),LEAVE_FULLSCREEN:i(949),ORIENTATION_CHANGE:i(948),RESIZE:i(947)}},function(t,e,i){var n=i(178),s=i(0),r=i(11),o=i(334),a=i(26),h=i(946),l=i(345),u=i(350),c=i(1),d=i(10),f=i(333),p=i(98),g=i(3),v=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=n.SCALE_MODE.NONE,this.resolution=1,this.zoom=1,this.displayScale=new g(1,1),this.autoRound=!1,this.autoCenter=n.CENTER.NO_CENTER,this.orientation=n.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once("boot",this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==n.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===n.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;return i&&(t=Math.floor(t),e=Math.floor(e)),this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),this.updateBounds(),this.displayScale.set(t/this.canvasBounds.width,e/this.canvasBounds.height),this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution),this.updateOrientation(),this.refresh()},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e)),this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var r=this.canvas.style,a=t*i,h=e*i;return s&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(r.width=a+"px",r.height=h+"px"),this.getParentBounds(),this.updateCenter(),this.updateBounds(),this.displayScale.set(t/this.canvasBounds.width,e/this.canvasBounds.height),this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution),this.updateOrientation(),this},setZoom:function(t){return this.zoom=t,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this.refresh()},refresh:function(){return this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height),this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),o>1&&(i.width=t+"px",i.height=e+"px")):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t),this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;if(t.active){if(document[t.cancel](),this._createdFullscreenTarget){var e=this.fullscreenTarget;if(e&&e.parentNode){var i=e.parentNode;i.insertBefore(this.canvas,e),i.removeChild(e)}}this.emit(o.LEAVE_FULLSCREEN),this.refresh()}},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.allowFullScreen){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){},onFullScreenError:function(){},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy(),this.fullscreenTarget=null},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(0),s=i(26),r=i(11),o=i(7),a=i(14),h=i(5),l=i(2),u=i(17),c=i(177),d=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(s.BOOT,this.boot,this)},boot:function(){var t,e,i,n,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t<u.length;t++)e=u[t],i=l(e,"key",null),n=l(e,"plugin",null),r=l(e,"start",!1),o=l(e,"mapping",null),a=l(e,"data",null),i&&n&&this.install(i,n,r,o,a);for(u=(u=h.installScenePlugins).concat(this._pendingScene),t=0;t<u.length;t++)e=u[t],i=l(e,"key",null),n=l(e,"plugin",null),o=l(e,"mapping",null),i&&n&&this.installScenePlugin(i,n,o);this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(s.DESTROY,this.destroy,this)},addToScene:function(t,e,i){var n,s,r,o=this.game,a=t.scene,h=t.settings.map,l=t.settings.isBooted;for(n=0;n<e.length;n++)o[s=e[n]]?(t[s]=o[s],h.hasOwnProperty(s)&&(a[h[s]]=t[s])):"game"===s&&h.hasOwnProperty(s)&&(a[h[s]]=o);for(var c=0;c<i.length;c++)for(r=i[c],n=0;n<r.length;n++)if(s=r[n],u.hasCore(s)){var d=u.getCore(s),f=new d.plugin(a,this);t[d.mapping]=f,d.custom?a[d.mapping]=f:h.hasOwnProperty(d.mapping)&&(a[h[d.mapping]]=f),l&&f.boot()}for(r=this.plugins,n=0;n<r.length;n++){var p=r[n];p.mapping&&(a[p.mapping]=p.plugin)}},getDefaultScenePlugins:function(){var t=this.game.config.defaultPlugins;return t=t.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,n){if("function"==typeof e){if(u.hasCore(t))console.warn("Scene Plugin key in use: "+t);else if(u.register(t,e,i,!0),this.scenePlugins.push(t),n){var s=new e(n,this);n.sys[t]=s,i&&""!==i&&(n[i]=s),s.boot()}}else console.warn("Invalid Scene Plugin: "+t)},install:function(t,e,i,n,s){if(void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=null),"function"!=typeof e)return console.warn("Invalid Plugin: "+t),null;if(u.hasCustom(t))return console.warn("Plugin key in use: "+t),null;if(null!==n&&(i=!0),this.game.isBooted){if(u.registerCustom(t,e,n,s),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:n,data:s});return null},getIndex:function(t){for(var e=this.plugins,i=0;i<e.length;i++){if(e[i].key===t)return i}return-1},getEntry:function(t){var e=this.getIndex(t);if(-1!==e)return this.plugins[e]},isActive:function(t){var e=this.getEntry(t);return e&&e.active},start:function(t,e){void 0===e&&(e=t);var i=this.getEntry(e);return i&&!i.active?(i.active=!0,i.plugin.start()):i||(i=this.createEntry(t,e)),i?i.plugin:null},createEntry:function(t,e){var i=u.getCustom(t);if(i){var n=new i.plugin(this);i={key:e,plugin:n,active:!0,mapping:i.mapping,data:i.data},this.plugins.push(i),n.init(i.data),n.start()}return i},stop:function(t){var e=this.getEntry(t);return e&&e.active&&(e.active=!1,e.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i=this.getEntry(t);if(i)return i.plugin;var n=this.getClass(t);return n&&e?(i=this.createEntry(t,t))?i.plugin:null:n||null},getClass:function(t){return u.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&c(this.plugins,e),u.removeCustom(t)},removeScenePlugin:function(t){c(this.scenePlugins,t),u.remove(t)},registerGameObject:function(t,e,i){return e&&h.register(t,e),i&&a.register(t,i),this},registerFileType:function(t,e,i){o.register(t,e),i&&i.sys.load&&(i.sys.load[t]=e)},destroy:function(){for(var t=0;t<this.plugins.length;t++)this.plugins[t].plugin.destroy();u.destroyCustomPlugins(),this.game.noReturn&&u.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=d},function(t,e,i){var n=i(0),s=i(52),r=i(1),o=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchCancel=r,this.onTouchOver=r,this.onTouchOut=r,t.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.target&&this.startListeners()},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueTouchStart(n),t.capture&&n.target===e&&n.preventDefault())},this.onTouchMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueTouchMove(e),t.capture&&e.preventDefault())},this.onTouchEnd=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueTouchEnd(i),t.capture&&i.target===e&&i.preventDefault())},this.onTouchCancel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueTouchCancel(e),t.capture&&e.preventDefault())},this.onTouchOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.setCanvasOver(e)},this.onTouchOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.setCanvasOut(e)};var n=this.target;if(n){var s={passive:!0},r={passive:!1};n.addEventListener("touchstart",this.onTouchStart,this.capture?r:s),n.addEventListener("touchmove",this.onTouchMove,this.capture?r:s),n.addEventListener("touchend",this.onTouchEnd,this.capture?r:s),n.addEventListener("touchcancel",this.onTouchCancel,this.capture?r:s),n.addEventListener("touchover",this.onTouchOver,this.capture?r:s),n.addEventListener("touchout",this.onTouchOut,this.capture?r:s),window&&(window.addEventListener("touchstart",this.onTouchStart,r),window.addEventListener("touchend",this.onTouchEnd,r)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),t.removeEventListener("touchover",this.onTouchOver),t.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("touchend",this.onTouchEnd))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},function(t,e,i){var n=i(386),s=i(0),r=i(56),o=i(186),a=i(377),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.time=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},reset:function(t){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.time=t,this.movementX=0,this.movementY=0},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t,e){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},down:function(t,e){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},move:function(t,e){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.moveTime=e,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=t,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0,this.wasCanceled=!1},touchmove:function(t,e){this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.justMoved=!0,this.moveTime=e,this.dirty=!0,this.wasTouch=!0},touchend:function(t,e){this.buttons=0,this.event=t,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1},touchcancel:function(t){this.buttons=0,this.event=t,this.primaryDown=!1,this.justUp=!1,this.isDown=!1,this.dirty=!0,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o<t;o++){var h=1/t*o;e[o]={x:a(h,i,s),y:a(h,n,r)}}return e},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}}});t.exports=l},function(t,e,i){var n=i(0),s=i(187),r=i(52),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseOver=o,this.onMouseOut=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&(t.manager.queueMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.setCanvasOut(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),window&&(window.addEventListener("mousedown",this.onMouseDown,o),window.addEventListener("mouseup",this.onMouseUp,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.queue.push(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("mouseup",this.onMouseUp)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(177),s=i(0),r=i(26),o=i(52),a=i(125),h=i(0),l=new s({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var n=t[i];"string"==typeof n&&(n=a[n.trim().toUpperCase()]),-1===e.indexOf(n)&&e.push(n)}this.preventDefault=e.length>0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var s=t[i];"string"==typeof s&&(s=a[s.toUpperCase()]),n(e,s)}this.preventDefault=e.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e){t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,TOUCH_CANCEL:7,POINTER_LOCK_CHANGE:6}},function(t,e,i){var n=i(0),s=i(341),r=i(11),o=i(52),a=i(26),h=i(340),l=i(339),u=i(338),c=i(337),d=i(41),f=i(371),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.queue=[],this.domCallbacks={up:[],down:[],move:[],upOnce:[],downOnce:[],moveOnce:[]},this.isOver=!0,this._emitIsOverEvent=!1,this._hasUpCallback=!1,this._hasDownCallback=!1,this._hasMoveCallback=!1,this._customCursor="",this._setCursor=0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.dirty=!1,this.globalTopOnly=!0,this.ignoreEvents=!1,this.useQueue=e.inputQueue,this._updatedThisFrame=!1,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.useQueue&&this.game.events.on(a.PRE_STEP,this.legacyUpdate,this),this.game.events.on(a.POST_STEP,this.postUpdate,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this._emitIsOverEvent=t},setCanvasOut:function(t){this.isOver=!1,this._emitIsOverEvent=t},update:function(t){this._updatedThisFrame||(this._setCursor=0,this._updatedThisFrame=!0),this.events.emit(o.MANAGER_UPDATE),this.ignoreEvents=!1,this.dirty=!0;for(var e=this.pointers,i=0;i<this.pointersTotal;i++)e[i].reset(t)},legacyUpdate:function(t){var e;this._setCursor=0,this.events.emit(o.MANAGER_UPDATE),this.ignoreEvents=!1,this.dirty=!1;var i=this.queue.length,n=this.pointers;for(e=0;e<this.pointersTotal;e++)n[e].reset(t);if(this.enabled&&0!==i){this.dirty=!0;var r=this.queue.splice(0,i),a=this.mousePointer;for(e=0;e<i;e+=2){var h=r[e],l=r[e+1];switch(h){case s.MOUSE_DOWN:a.down(l,t);break;case s.MOUSE_MOVE:a.move(l,t);break;case s.MOUSE_UP:a.up(l,t);break;case s.TOUCH_START:this.startPointer(l,t);break;case s.TOUCH_MOVE:this.updatePointer(l,t);break;case s.TOUCH_END:this.stopPointer(l,t);break;case s.TOUCH_CANCEL:this.cancelPointer(l,t);break;case s.POINTER_LOCK_CHANGE:this.events.emit(o.POINTERLOCK_CHANGE,l,this.mouse.locked)}}for(e=0;e<this.pointersTotal;e++)n[e].updateMotion()}else for(e=0;e<this.pointersTotal;e++)n[e].updateMotion()},postUpdate:function(){1===this._setCursor?this.canvas.style.cursor=this._customCursor:2===this._setCursor&&(this.canvas.style.cursor=this.defaultCursor),this._emitIsOverEvent=null,this.dirty=!1,this._updatedThisFrame=!1},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this._setCursor=1,this._customCursor=t.cursor)},resetCursor:function(t){t.cursor&&(this._setCursor=2)},startPointer:function(t,e){for(var i=this.pointers,n=[],s=0;s<t.changedTouches.length;s++)for(var r=t.changedTouches[s],o=1;o<this.pointersTotal;o++){var a=i[o];if(!a.active){a.touchstart(r,e),this.activePointer=a,n.push(a);break}}return n},updatePointer:function(t,e){for(var i=this.pointers,n=[],s=0;s<t.changedTouches.length;s++)for(var r=t.changedTouches[s],o=1;o<this.pointersTotal;o++){var a=i[o];if(a.active&&a.identifier===r.identifier){a.touchmove(r,e),this.activePointer=a,n.push(a);break}}return n},stopPointer:function(t,e){for(var i=this.pointers,n=[],s=0;s<t.changedTouches.length;s++)for(var r=t.changedTouches[s],o=1;o<this.pointersTotal;o++){var a=i[o];if(a.active&&a.identifier===r.identifier){a.touchend(r,e),n.push(a);break}}return n},cancelPointer:function(t,e){for(var i=this.pointers,n=[],s=0;s<t.changedTouches.length;s++)for(var r=t.changedTouches[s],o=1;o<this.pointersTotal;o++){var a=i[o];if(a.active&&a.identifier===r.identifier){a.touchend(r,e),n.push(a);break}}return n},addPointer:function(t){void 0===t&&(t=1);var e=[];this.pointersTotal+t>10&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var n=this.pointers.length,s=new u(this,n);s.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(s),this.pointersTotal++,e.push(s)}return e},processDomCallbacks:function(t,e,i){var n=0;for(n=0;n<t.length;n++)t[n](i);for(n=0;n<e.length;n++)e[n](i);return e.length>0},updateInputPlugins:function(t,e){for(var i=this.game.scene.getScenes(!0,!0),n=0;n<i.length;n++){var s=i[n];s.sys.input&&s.sys.input.update(t,e)}},queueTouchStart:function(t){if(this.useQueue){if(this.queue.push(s.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t),e.downOnce=[]}}else if(this.enabled){this.update(t.timeStamp),this.startPointer(t,t.timeStamp).forEach(function(t){t.updateMotion()}),this.updateInputPlugins(t.timeStamp,this.game.loop.delta)}},queueTouchMove:function(t){if(this.useQueue){if(this.queue.push(s.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t),e.moveOnce=[]}}else if(this.enabled){this.update(t.timeStamp),this.updatePointer(t,t.timeStamp).forEach(function(t){t.updateMotion()}),this.updateInputPlugins(t.timeStamp,this.game.loop.delta)}},queueTouchEnd:function(t){if(this.useQueue){if(this.queue.push(s.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t),e.upOnce=[]}}else if(this.enabled){this.update(t.timeStamp),this.stopPointer(t,t.timeStamp).forEach(function(t){t.updateMotion()}),this.updateInputPlugins(t.timeStamp,this.game.loop.delta)}},queueTouchCancel:function(t){if(this.useQueue)this.queue.push(s.TOUCH_CANCEL,t);else if(this.enabled){this.update(t.timeStamp),this.cancelPointer(t,t.timeStamp).forEach(function(t){t.updateMotion()}),this.updateInputPlugins(t.timeStamp,this.game.loop.delta)}},queueMouseDown:function(t){if(this.useQueue){if(this.queue.push(s.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t),e.downOnce=[]}}else this.enabled&&(this.update(t.timeStamp),this.mousePointer.down(t,t.timeStamp),this.mousePointer.updateMotion(),this.updateInputPlugins(t.timeStamp,this.game.loop.delta))},queueMouseMove:function(t){if(this.useQueue){if(this.queue.push(s.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t),e.moveOnce=[]}}else this.enabled&&(this.update(t.timeStamp),this.mousePointer.move(t,t.timeStamp),this.mousePointer.updateMotion(),this.updateInputPlugins(t.timeStamp,this.game.loop.delta))},queueMouseUp:function(t){if(this.useQueue){if(this.queue.push(s.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t),e.upOnce=[]}}else this.enabled&&(this.update(t.timeStamp),this.mousePointer.up(t,t.timeStamp),this.mousePointer.updateMotion(),this.updateInputPlugins(t.timeStamp,this.game.loop.delta))},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!t.willRender(e))return!1;var n=!0,s=t.parentContainer;if(s)do{if(!s.willRender(e)){n=!1;break}s=s.parentContainer}while(s);return n},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var s=this._tempPoint,r=i.scrollX,o=i.scrollY;n.length=0;var a=t.x,h=t.y;1!==i.resolution&&(a+=i._x,h+=i._y),i.getWorldPoint(a,h,s),t.worldX=s.x,t.worldY=s.y;for(var l={x:0,y:0},u=this._tempMatrix,c=this._tempMatrix2,d=0;d<e.length;d++){var p=e[d];if(this.inputCandidate(p,i)){var g=s.x+r*p.scrollFactorX-r,v=s.y+o*p.scrollFactorY-o;p.parentContainer?(p.getWorldTransformMatrix(u,c),u.applyInverse(g,v,l)):f(g,v,p.x,p.y,p.rotation,p.scaleX,p.scaleY,l),this.pointWithinHitArea(p,l.x,l.y)&&n.push(p)}}return n},pointWithinHitArea:function(t,e,i){e+=t.displayOriginX,i+=t.displayOriginY;var n=t.input;return!(!n||!n.hitAreaCallback(n.hitArea,e,i,t))&&(n.localX=e,n.localY=i,!0)},pointWithinInteractiveObject:function(t,e,i){return!!t.hitArea&&(e+=t.gameObject.displayOriginX,i+=t.gameObject.displayOriginY,t.localX=e,t.localY=i,t.hitAreaCallback(t.hitArea,e,i,t))},transformPointer:function(t,e,i,n){var s=t.position,r=t.prevPosition;r.x=s.x,r.y=s.y;var o=this.scaleManager.transformX(e),a=this.scaleManager.transformY(i),h=t.smoothFactor;n&&0!==h?(s.x=o*h+r.x*(1-h),s.y=a*h+r.y*(1-h)):(s.x=o,s.y=a)},destroy:function(){this.events.removeAllListeners(),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var t=0;t<this.pointers.length;t++)this.pointers[t].destroy();this.domCallbacks={},this.pointers=[],this.queue=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});t.exports=p},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e,i){var n=i(178);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.PORTRAIT:n.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.PORTRAIT:n.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.LANDSCAPE}return e>t?n.PORTRAIT:n.LANDSCAPE}},function(t,e,i){var n=i(99);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e,i){var n=i(32);n.ColorToRGBA=i(1005),n.ComponentToHex=i(353),n.GetColor=i(191),n.GetColor32=i(409),n.HexStringToColor=i(410),n.HSLToColor=i(1004),n.HSVColorWheel=i(1003),n.HSVToRGB=i(190),n.HueToComponent=i(352),n.IntegerToColor=i(407),n.IntegerToRGB=i(406),n.Interpolate=i(1002),n.ObjectToColor=i(405),n.RandomRGB=i(1001),n.RGBStringToColor=i(404),n.RGBToHSV=i(408),n.RGBToString=i(1e3),n.ValueToColor=i(192),t.exports=n},function(t,e,i){var n=i(185),s=i(0),r=i(76),o=i(3),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;e<t.length;e++){var i=new o;"number"==typeof t[e]?(i.x=t[e],i.y=t[e+1],e++):Array.isArray(t[e])?(i.x=t[e][0],i.y=t[e][1]):(i.x=t[e].x,i.y=t[e].y),this.points.push(i)}return this},addPoint:function(t,e){var i=new o(t,e);return this.points.push(i),i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.points,s=(i.length-1)*t,r=Math.floor(s),a=s-r,h=i[0===r?r:r-1],l=i[r],u=i[r>i.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e<this.points.length;e++)t.push(this.points[e].x),t.push(this.points[e].y);return{type:this.type,points:t}}});a.fromJSON=function(t){return new a(t.points)},t.exports=a},function(t,e,i){var n=i(0),s=i(76),r=i(378),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this,"QuadraticBezier"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,s=this.p2;return e.set(r(t,i.x,n.x,s.x),r(t,i.y,n.y,s.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});a.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),n=new o(e[2],e[3]),s=new o(e[4],e[5]);return new a(i,n,s)},t.exports=a},function(t,e,i){var n=i(0),s=i(76),r=i(180),o=i(10),a=i(3),h=new a,l=new n({Extends:s,initialize:function(t,e){s.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(){return h.copy(this.p1).subtract(this.p0).normalize()},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});l.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),n=new a(e[2],e[3]);return new l(i,n)},t.exports=l},function(t,e,i){var n=i(0),s=i(76),r=i(34),o=i(4),a=i(183),h=i(3),l=new n({Extends:s,initialize:function(t,e,i,n,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),n=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===n&&(n=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);s.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,s=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=s?0:i),this._clockwise&&!s&&(n===i?n=-i:n-=i);var r=this._startAngle+t*n,o=this.p0.x+this._xRadius*Math.cos(r),a=this.p0.y+this._yRadius*Math.sin(r);if(0!==this._rotation){var l=Math.cos(this._rotation),u=Math.sin(this._rotation),c=o-this.p0.x,d=a-this.p0.y;o=c*l-d*u+this.p0.x,a=c*u+d*l+this.p0.y}return e.set(o,a)},setXRadius:function(t){return this.xRadius=t,this},setYRadius:function(t){return this.yRadius=t,this},setWidth:function(t){return this.xRadius=2*t,this},setHeight:function(t){return this.yRadius=2*t,this},setStartAngle:function(t){return this.startAngle=t,this},setEndAngle:function(t){return this.endAngle=t,this},setClockwise:function(t){return this.clockwise=t,this},setRotation:function(t){return this.rotation=t,this},x:{get:function(){return this.p0.x},set:function(t){this.p0.x=t}},y:{get:function(){return this.p0.y},set:function(t){this.p0.y=t}},xRadius:{get:function(){return this._xRadius},set:function(t){this._xRadius=t}},yRadius:{get:function(){return this._yRadius},set:function(t){this._yRadius=t}},startAngle:{get:function(){return a(this._startAngle)},set:function(t){this._startAngle=r(t)}},endAngle:{get:function(){return a(this._endAngle)},set:function(t){this._endAngle=r(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return a(this._rotation)},set:function(t){this._rotation=r(t)}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:a(this._startAngle),endAngle:a(this._endAngle),clockwise:this._clockwise,rotation:a(this._rotation)}}});l.fromJSON=function(t){return new l(t)},t.exports=l},function(t,e,i){var n=i(0),s=i(379),r=i(76),o=i(3),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,r=this.p2,a=this.p3;return e.set(s(t,i.x,n.x,r.x,a.x),s(t,i.y,n.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});a.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),n=new o(e[2],e[3]),s=new o(e[4],e[5]),r=new o(e[6],e[7]);return new a(i,n,s,r)},t.exports=a},function(t,e){t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){var n=i(360),s=i(24),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;v<e.length;v++)for(var y=e[v],m=0;m<y.length;m++){var x=y[m];"."!==x&&" "!==x&&(g.fillStyle=o[x],g.fillRect(m*a,v*h,a,h))}return d&&d(i,g),i}},function(t,e,i){var n=i(26);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(0),s=i(4),r=i(1),o=i(363),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0,this.frame=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t,this.raf.start(this.step.bind(this),this.forceSetTimeOut)},step:function(t){var e=t-this.lastTime;e<0&&(e=0),this.rawDelta=e;var i=this.deltaIndex,n=this.deltaHistory,s=this.deltaSmoothingMax,r=e;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;a<s;a++)o+=n[a];o/=s,this.delta=o,this.time+=this.rawDelta,t>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(28);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(366),s=i(24),r=i(28),o=i(187);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(459),h=i(456),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(0),s=i(182),r=i(370),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],y=e*o-i*r,m=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,S=l*p-u*f,_=l*g-c*f,A=l*v-d*f,E=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=y*M-m*C+x*E+T*A-w*_+b*S;return P?(P=1/P,t[0]=(o*M-a*C+h*E)*P,t[1]=(n*C-i*M-s*E)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*A-r*M-h*_)*P,t[5]=(e*M-n*A+s*_)*P,t[6]=(g*x-f*b-v*m)*P,t[7]=(l*b-c*x+d*m)*P,t[8]=(r*C-o*A+h*S)*P,t[9]=(i*A-e*C-s*S)*P,t[10]=(f*w-p*x+v*y)*P,t[11]=(u*x-l*w-d*y)*P,t[12]=(o*_-r*E-a*S)*P,t[13]=(e*E-i*_+n*S)*P,t[14]=(p*m-f*T-g*y)*P,t[15]=(l*T-u*m+c*y)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],y=e[15],m=t.val,x=m[0],T=m[1],w=m[2],b=m[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*y,x=m[4],T=m[5],w=m[6],b=m[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*y,x=m[8],T=m[9],w=m[10],b=m[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*y,x=m[12],T=m[13],w=m[14],b=m[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*y,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],y=i[7],m=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,S=s*n*l+r*a,_=r*n*l-s*a,A=n*s*l-r*a,E=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,P=s*r*l-n*a,O=r*r*l+h;return i[0]=u*b+p*S+m*_,i[1]=c*b+g*S+x*_,i[2]=d*b+v*S+T*_,i[3]=f*b+y*S+w*_,i[4]=u*A+p*E+m*C,i[5]=c*A+g*E+x*C,i[6]=d*A+v*E+T*C,i[7]=f*A+y*E+w*C,i[8]=u*M+p*P+m*O,i[9]=c*M+g*P+x*O,i[10]=d*M+v*P+T*O,i[11]=f*M+y*P+w*O,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,y=o*h,m=o*l;return i[0]=1-(f+g),i[1]=c+m,i[2]=d-y,i[3]=0,i[4]=c-m,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+y,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,y=r*h;return e[0]=1-(d+p),e[1]=u+y,e[2]=c-v,e[3]=0,e[4]=u-y,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),y=h*(g*=v)-l*(p*=v),m=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(y*y+m*m+x*x))?(y*=v=1/v,m*=v,x*=v):(y=0,m=0,x=0);var T=p*x-g*m,w=g*y-f*x,b=f*m-p*y;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=y,n[1]=T,n[2]=f,n[3]=0,n[4]=m,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(y*s+m*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+T*h,e[7]=m*n+x*o+T*l,e[8]=m*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,S=s*u-o*h,_=r*u-o*l,A=c*v-d*g,E=c*y-f*g,C=c*m-p*g,M=d*y-f*v,P=d*m-p*v,O=f*m-p*y,R=x*O-T*P+w*M+b*C-S*E+_*A;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*E)*R,i[2]=(a*P-h*C+u*A)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*E)*R,i[5]=(s*C-n*P-o*A)*R,i[6]=(v*_-y*S+m*b)*R,i[7]=(y*w-g*_-m*T)*R,i[8]=(g*S-v*w+m*x)*R,this):null}});t.exports=n},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},function(t,e,i){var n=i(195);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e){t.exports=function(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e){t.exports=function(t,e,i,n,s){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,s)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e,i){var n=i(380);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e,i){var n=i(20),s=i(19),r={Angle:i(1091),Distance:i(1083),Easing:i(1081),Fuzzy:i(1080),Interpolation:i(1077),Pow2:i(1072),Snap:i(1070),RandomDataGenerator:i(1068),Average:i(1067),Bernstein:i(381),Between:i(184),CatmullRom:i(185),CeilTo:i(1066),Clamp:i(23),DegToRad:i(34),Difference:i(1065),Factorial:i(380),FloatBetween:i(374),FloorTo:i(1064),FromPercent:i(100),GetSpeed:i(1063),IsEven:i(1062),IsEvenStrict:i(1061),Linear:i(129),MaxAdd:i(1060),MinSub:i(1059),Percent:i(1058),RadToDeg:i(183),RandomXY:i(1057),RandomXYZ:i(1056),RandomXYZW:i(1055),Rotate:i(373),RotateAround:i(428),RotateAroundDistance:i(197),RoundAwayFromZero:i(372),RoundTo:i(1054),SinCosTableGenerator:i(1053),SmootherStep:i(196),SmoothStep:i(195),TransformXY:i(371),Within:i(1052),Wrap:i(57),Vector2:i(3),Vector3:i(182),Vector4:i(1051),Matrix3:i(370),Matrix4:i(369),Quaternion:i(368),RotateVec3:i(1050)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n,s,r,o=i(24),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){t.exports={os:i(99),browser:i(128),features:i(187),input:i(1095),audio:i(1094),video:i(1093),fullscreen:i(1092),canvasFeatures:i(388)}},function(t,e,i){var n=i(0),s=i(28),r=i(389),o=i(2),a=i(4),h=i(8),l=i(387),u=i(1),c=i(181),d=i(192),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputQueue=a(t,"input.queue",!1),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports=i(1119)},function(t,e,i){t.exports={In:i(1122),Out:i(1121),InOut:i(1120)}},function(t,e,i){t.exports={In:i(1125),Out:i(1124),InOut:i(1123)}},function(t,e,i){t.exports={In:i(1128),Out:i(1127),InOut:i(1126)}},function(t,e,i){t.exports={In:i(1131),Out:i(1130),InOut:i(1129)}},function(t,e,i){t.exports=i(1132)},function(t,e,i){t.exports={In:i(1135),Out:i(1134),InOut:i(1133)}},function(t,e,i){t.exports={In:i(1138),Out:i(1137),InOut:i(1136)}},function(t,e,i){t.exports={In:i(1141),Out:i(1140),InOut:i(1139)}},function(t,e,i){t.exports={In:i(1144),Out:i(1143),InOut:i(1142)}},function(t,e,i){t.exports={In:i(1147),Out:i(1146),InOut:i(1145)}},function(t,e,i){t.exports={In:i(1150),Out:i(1149),InOut:i(1148)}},function(t,e,i){t.exports={Fade:i(1153),Flash:i(1152),Pan:i(1151),Shake:i(1118),Zoom:i(1117)}},function(t,e,i){var n=i(32);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){var n=i(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e){t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(32),s=i(406);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e<i?6:0):r===e?a=(i-t)/o+2:r===i&&(a=(t-e)/o+4),a/=6),n.hasOwnProperty("_h")?(n._h=a,n._s=h,n._v=l):(n.h=a,n.s=h,n.v=l),n}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e,i){var n=i(32);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e,i){var n=i(131),s=i(24),r=i(189),o=i(23),a=i(0),h=i(13),l=i(403),u=i(129),c=i(10),d=i(3),f=new a({Extends:n,Mixins:[h.Flip,h.Tint],initialize:function(t,e,i,s){n.call(this,t,e,i,s),this.inputEnabled=!0,this.fadeEffect=new l.Fade(this),this.flashEffect=new l.Flash(this),this.shakeEffect=new l.Shake(this),this.panEffect=new l.Pan(this),this.zoomEffect=new l.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null,this.renderToTexture=!1,this.canvas=null,this.context=null,this.glTexture=null,this.framebuffer=null,this.pipeline=null},setRenderToTexture:function(t){var e=this.scene.sys.game.renderer;return e.gl?(this.glTexture=e.createTextureFromSource(null,this.width,this.height,0),this.framebuffer=e.createFramebuffer(this.width,this.height,this.glTexture,!1)):(this.canvas=s.create2D(this,this.width,this.height),this.context=this.canvas.getContext("2d")),this.renderToTexture=!0,t&&this.setPipeline(t),this},setPipeline:function(t){if("string"==typeof t){var e=this.scene.sys.game.renderer;e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t))}else this.pipeline=t;return this},clearRenderToTexture:function(){var t=this.scene.sys.game.renderer;return t.gl?(this.framebuffer&&t.deleteFramebuffer(this.framebuffer),this.glTexture&&t.deleteTexture(this.glTexture),this.framebuffer=null,this.glTexture=null,this.pipeline=null):(s.remove(this),this.canvas=null,this.context=null),this.renderToTexture=!1,this},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,n=this.height/2,s=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(s,o),this.scrollX=s-i,this.scrollY=o-n}r(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,n,s,r){return this.fadeEffect.start(!1,t,e,i,n,!0,s,r)},fadeOut:function(t,e,i,n,s,r){return this.fadeEffect.start(!0,t,e,i,n,!0,s,r)},fadeFrom:function(t,e,i,n,s,r,o){return this.fadeEffect.start(!1,t,e,i,n,s,r,o)},fade:function(t,e,i,n,s,r,o){return this.fadeEffect.start(!0,t,e,i,n,s,r,o)},flash:function(t,e,i,n,s,r,o){return this.flashEffect.start(t,e,i,n,s,r,o)},shake:function(t,e,i,n,s){return this.shakeEffect.start(t,e,i,n,s)},pan:function(t,e,i,n,s,r,o){return this.panEffect.start(t,e,i,n,s,r,o)},zoomTo:function(t,e,i,n,s,r){return this.zoomEffect.start(t,e,i,n,s,r)},preRender:function(t){var e=this.width,i=this.height,n=.5*e,s=.5*i,o=this.zoom*t,a=this.matrix,h=e*this.originX,l=i*this.originY,c=this._follow,d=this.deadzone,f=this.scrollX,p=this.scrollY;if(d&&r(d,this.midPoint.x,this.midPoint.y),c){var g=c.x-this.followOffset.x,v=c.y-this.followOffset.y;d?(g<d.x?f=u(f,f-(d.x-g),this.lerp.x):g>d.right&&(f=u(f,f+(g-d.right),this.lerp.x)),v<d.y?p=u(p,p-(d.y-v),this.lerp.y):v>d.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var y=f+n,m=p+s;this.midPoint.set(y,m);var x=e/o,T=i/o;this.worldView.setTo(y-x/2,m-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(414),s=i(0),r=i(26),o=new s({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","html","obj","tilemap","xml"],e=0;e<t.length;e++)this[t[e]].destroy(),this[t[e]]=null;for(var i in this.custom)this.custom[i].destroy();this.custom=null,this.game=null}});t.exports=o},function(t,e,i){t.exports={ADD:i(1175),REMOVE:i(1174)}},function(t,e,i){var n=i(0),s=i(194),r=i(11),o=i(413),a=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},function(t,e,i){var n=i(205),s=i(0),r=i(194),o=i(11),a=i(136),h=i(26),l=i(4),u=i(193),c=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this;console.warn("Animation key exists: "+t)},exists:function(t){return this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n<t.anims.length;n++)i.push(this.create(t.anims[n]));t.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=t.globalTimeScale)}else t.hasOwnProperty("key")&&"frame"===t.type&&i.push(this.create(t));return i},generateFrameNames:function(t,e){var i=l(e,"prefix",""),n=l(e,"start",0),s=l(e,"end",0),r=l(e,"suffix",""),o=l(e,"zeroPad",0),a=l(e,"outputArray",[]),h=l(e,"frames",!1),c=this.textureManager.get(t);if(!c)return a;var d,f,p=n<s?1:-1;if(s+=p,e)if(Array.isArray(h))for(d=0;d<h.length;d++)f=i+u(h[d],o,"0",1)+r,c.has(f)&&a.push({key:t,frame:f});else for(d=n;d!==s;d+=p)f=i+u(d,o,"0",1)+r,c.has(f)&&a.push({key:t,frame:f});else for(h=c.getFrameNames(),d=0;d<h.length;d++)a.push({key:t,frame:h[d]});return a},generateFrameNumbers:function(t,e){var i,n=l(e,"start",0),s=l(e,"end",-1),r=l(e,"first",!1),o=l(e,"outputArray",[]),a=l(e,"frames",!1),h=this.textureManager.get(t);if(!h)return o;if(r&&h.has(r)&&o.push({key:t,frame:r}),Array.isArray(a))for(i=0;i<a.length;i++)h.has(a[i])&&o.push({key:t,frame:a[i]});else for(-1===s&&(s=h.frameTotal),i=n;i<=s;i++)h.has(i)&&o.push({key:t,frame:i});return o},get:function(t){return this.anims.get(t)},load:function(t,e,i){var n=this.get(e);return n&&n.load(t,i),t},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(a.PAUSE_ALL)),this},play:function(t,e){if(Array.isArray(e)||(e=[e]),this.get(t)){for(var i=0;i<e.length;i++)e[i].anims.play(t);return this}},remove:function(t){var e=this.get(t);return e&&(this.emit(a.REMOVE_ANIMATION,t,e),this.anims.delete(t)),e},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(a.RESUME_ALL)),this},staggerPlay:function(t,e,i){if(void 0===i&&(i=0),Array.isArray(e)||(e=[e]),this.get(t)){for(var n=0;n<e.length;n++)e[n].anims.delayedPlay(i*n,t);return this}},toJSON:function(t){if(void 0!==t&&""!==t)return this.anims.get(t).toJSON();var e={anims:[],globalTimeScale:this.globalTimeScale};return this.anims.each(function(t,i){e.anims.push(i.toJSON())}),e},destroy:function(){this.anims.clear(),this.textureManager=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),l=n<r?1:-1,u=s<o?1:-1,c=a-h;i.push({x:n,y:s});for(var d=1;n!==r||s!==o;){var f=c<<1;f>-h&&(c-=h,n+=l),f<a&&(c+=a,s+=u),d%e==0&&i.push({x:n,y:s}),d++}return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.pop(),t.unshift(i);return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.shift(),t.push(i);return i}},function(t,e,i){var n=i(135),s=i(6);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(n(t)/e):e=n(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l<i;l++)switch(r.push(new s(o,a)),h){case 0:(o+=e)>=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e,i){t.exports={CHANGE_DATA:i(1238),CHANGE_DATA_KEY:i(1237),REMOVE_DATA:i(1236),SET_DATA:i(1235)}},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var n=i(20),s=i(41),r=i(214),o=i(213),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new s),void 0===e&&(e=new s);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t}};t.exports=a},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1},setShape:function(t){this.geometryMask=t},preRenderWebGL:function(t,e,i){var n=t.gl,s=this.geometryMask;t.flush(),n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.NOTEQUAL,1,1),n.stencilOp(n.REPLACE,n.REPLACE,n.REPLACE),s.renderWebGL(t,s,0,i),t.flush(),n.colorMask(!0,!0,!0,!0),this.invertAlpha?n.stencilFunc(n.NOTEQUAL,1,1):n.stencilFunc(n.EQUAL,1,1),n.stencilOp(n.KEEP,n.KEEP,n.KEEP)},postRenderWebGL:function(t){var e=t.gl;t.flush(),e.disable(e.STENCIL_TEST)},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,0,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){var i=t.sys.game.renderer;if(this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,i&&i.gl){var n=i.width,s=i.height,r=0==(n&n-1)&&0==(s&s-1),o=i.gl,a=r?o.REPEAT:o.CLAMP_TO_EDGE,h=o.LINEAR;this.mainTexture=i.createTexture2D(0,h,h,a,a,o.RGBA,null,n,s),this.maskTexture=i.createTexture2D(0,h,h,a,a,o.RGBA,null,n,s),this.mainFramebuffer=i.createFramebuffer(n,s,this.mainTexture,!1),this.maskFramebuffer=i.createFramebuffer(n,s,this.maskTexture,!1),i.onContextRestored(function(t){var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),s=t.gl,r=n?s.REPEAT:s.CLAMP_TO_EDGE,o=s.LINEAR;this.mainTexture=t.createTexture2D(0,o,o,r,r,s.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,o,o,r,r,s.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!1),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!1)},this)}},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BitmapMaskPipeline.beginMask(this,e,i)},postRenderWebGL:function(t){t.pipelines.BitmapMaskPipeline.endMask(this)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null;var t=this.renderer;t&&t.gl&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer)),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null,this.renderer=null}});t.exports=n},function(t,e,i){var n=i(426),s=i(425),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*s-a*r+e,t.y=o*r+a*s+i,t}},function(t,e,i){var n=i(6);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(204),s=i(135);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o<e;o++){var a=o/e;r.push(n(t,a))}return r}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(60),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,s,r=1;if(i){if(t<e[0][i])return e[0];for(;e[r][i]<t;)r++}else for(;e[r]<t;)r++;return r>e.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=i(23),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e){t.exports=function(t){return Math.PI*t.radius*2}},function(t,e,i){var n=i(436),s=i(207),r=i(100),o=i(20);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h<e;h++){var l=r(h/e,0,o.PI2);a.push(s(t,l))}return a}},function(t,e,i){var n=i(207),s=i(100),r=i(20),o=i(6);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(47),s=i(45),r=i(46),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(49),s=i(45),r=i(48),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(81),s=i(45),r=i(80),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(78),s=i(47),r=i(79),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(78),s=i(49),r=i(79),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(80),s=i(79);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(444),s=i(81),r=i(78);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(51),s=i(47),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(50),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(81),r=i(50),o=i(80);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(208),s=[];s[n.BOTTOM_CENTER]=i(448),s[n.BOTTOM_LEFT]=i(447),s[n.BOTTOM_RIGHT]=i(446),s[n.CENTER]=i(445),s[n.LEFT_CENTER]=i(443),s[n.RIGHT_CENTER]=i(442),s[n.TOP_CENTER]=i(441),s[n.TOP_LEFT]=i(440),s[n.TOP_RIGHT]=i(439);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(1271),Call:i(1270),GetFirst:i(1269),GetLast:i(1268),GridAlign:i(1267),IncAlpha:i(1233),IncX:i(1232),IncXY:i(1231),IncY:i(1230),PlaceOnCircle:i(1229),PlaceOnEllipse:i(1228),PlaceOnLine:i(1227),PlaceOnRectangle:i(1226),PlaceOnTriangle:i(1225),PlayAnimation:i(1224),PropertyValueInc:i(35),PropertyValueSet:i(27),RandomCircle:i(1223),RandomEllipse:i(1222),RandomLine:i(1221),RandomRectangle:i(1220),RandomTriangle:i(1219),Rotate:i(1218),RotateAround:i(1217),RotateAroundDistance:i(1216),ScaleX:i(1215),ScaleXY:i(1214),ScaleY:i(1213),SetAlpha:i(1212),SetBlendMode:i(1211),SetDepth:i(1210),SetHitArea:i(1209),SetOrigin:i(1208),SetRotation:i(1207),SetScale:i(1206),SetScaleX:i(1205),SetScaleY:i(1204),SetTint:i(1203),SetVisible:i(1202),SetX:i(1201),SetXY:i(1200),SetY:i(1199),ShiftPosition:i(1198),Shuffle:i(1197),SmootherStep:i(1196),SmoothStep:i(1195),Spread:i(1194),ToggleVisible:i(1193),WrapInRectangle:i(1192)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h<s.length;h++)r[h]=s[h].contact;var l=s.length;l<r.length&&(r.length=l),t.separation=e.depth,i.setActive(t,!0,n)}else!0===t.isActive&&i.setActive(t,!1,n)},i.setActive=function(t,e,i){e?(t.isActive=!0,t.timeUpdated=i):(t.isActive=!1,t.activeContacts.length=0)},i.id=function(t,e){return t.id<e.id?"A"+t.id+"B"+e.id:"A"+e.id+"B"+t.id}},function(t,e,i){t.exports={Bounce:i(1333),Collision:i(1332),Force:i(1331),Friction:i(1330),Gravity:i(1329),Mass:i(1328),Static:i(1327),Sensor:i(1326),SetBody:i(1325),Sleep:i(1323),Transform:i(1313),Velocity:i(1312)}},function(t,e,i){var n=i(0),s=i(1042),r=i(211),o=10,a=new n({Extends:r,initialize:function(t){o=t.maxLights,t.fragShader=s.replace("%LIGHT_COUNT%",o.toString()),r.call(this,t),this.defaultNormalMap,this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1])},boot:function(){this.defaultNormalMap=this.game.textures.getFrame("__DEFAULT")},onBind:function(t){r.prototype.onBind.call(this);var e=this.renderer,i=this.program;return this.mvpUpdate(),e.setInt1(i,"uNormSampler",1),e.setFloat2(i,"uResolution",this.width,this.height),t&&this.setNormalMap(t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var n=i.cull(e),s=Math.min(n.length,o);if(0===s)return this;this.active=!0;var r,a=this.renderer,h=this.program,l=e.matrix,u={x:0,y:0},c=a.height;for(r=0;r<o;++r)a.setFloat1(h,"uLights["+r+"].radius",0);for(a.setFloat4(h,"uCamera",e.x,e.y,e.rotation,e.zoom),a.setFloat3(h,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r<s;++r){var d=n[r],f="uLights["+r+"].";l.transformPoint(d.x,d.y,u),a.setFloat2(h,f+"position",u.x-e.scrollX*d.scrollFactorX*e.zoom,c-(u.y-e.scrollY*d.scrollFactorY*e.zoom)),a.setFloat3(h,f+"color",d.r,d.g,d.b),a.setFloat1(h,f+"intensity",d.intensity),a.setFloat1(h,f+"radius",d.radius)}return this},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,T,w,b,S,_,A,E,C,M,P){var O;if(this.active)if(this.renderer.setPipeline(this),t.displayTexture?O=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?O=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(O=t.tileset.image.dataSource[0]),O){this.setTexture2D(O.glTexture,1),this.setNormalMapRotation(u);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,F=y/i+E,k=m/n+C,I=(y+x)/i+E,B=(m+T)/n+C,Y=o,N=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;Y=U.width,N=U.height,o=U.width,a=U.height;var G=y=U.x,W=m=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),F=G/i+E,k=W/n+C,I=(G+U.width)/i+E,B=(W+U.height)/n+C,X=-g+y,z=-v+m}d^=e.isRenderTexture?1:0,c&&(Y*=-1,X+=o),d&&(N*=-1,z+=a);var V=X+Y,H=z+N;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,z),tt=D.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,F,k,I,B,w,b,S,_,A,e,0)}else console.warn("Normal map missing or invalid")},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},setNormalMapRotation:function(t){var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e)},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e,i){var n=i(0),s=i(1044),r=i(1043),o=i(212),a=new n({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:s,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=this.renderer,s=this.gl,r=t.bitmapMask;r&&s&&(n.flush(),n.setFramebuffer(t.maskFramebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),r.renderWebGL(n,r,0,i),n.flush(),n.setFramebuffer(t.mainFramebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT))},endMask:function(t){var e=this.renderer,i=this.gl;t.bitmapMask&&i&&(e.setFramebuffer(null),e.setPipeline(this),e.setTexture2D(t.maskTexture,1),e.setTexture2D(t.mainTexture,0),e.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),i.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e,i){var n=i(24),s=i(32),r=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=r(e,"x",0),u=r(e,"y",0),c=r(e,"width",i.drawingBufferWidth),d=r(e,"height",i.drawingBufferHeight);if(r(e,"getPixel",!1)){var f=new Uint8Array(4);i.readPixels(l,i.drawingBufferHeight-u,1,1,i.RGBA,i.UNSIGNED_BYTE,f),o.call(null,new s(f[0],f[1],f[2],f[3]/255))}else{var p=new Uint8Array(c*d*4);i.readPixels(l,i.drawingBufferHeight-u-d,c,d,i.RGBA,i.UNSIGNED_BYTE,p);for(var g=n.createWebGL(this,c,d),v=g.getContext("2d"),y=v.getImageData(0,0,c,d),m=y.data,x=0;x<d;x++)for(var T=0;T<c;T++){var w=4*((d-x)*c+T),b=4*(x*c+T);m[b+0]=p[w+0],m[b+1]=p[w+1],m[b+2]=p[w+2],m[b+3]=p[w+3]}v.putImageData(y,0,0);var S=new Image;S.onerror=function(){o.call(null),n.remove(g)},S.onload=function(){o.call(null,S),n.remove(g)},S.src=g.toDataURL(a,h)}}},function(t,e,i){var n=i(131),s=i(40),r=i(0),o=i(28),a=i(127),h=i(97),l=i(126),u=i(41),c=i(9),d=i(455),f=i(454),p=i(453),g=i(211),v=new r({initialize:function(t){var e=this,i=t.config,s={alpha:i.transparent,depth:!1,antialias:i.antialias,premultipliedAlpha:i.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:i.failIfMajorPerformanceCaveat,powerPreference:i.powerPreference};this.config={clearBeforeRender:i.clearBeforeRender,antialias:i.antialias,backgroundColor:i.backgroundColor,contextCreation:s,resolution:i.resolution,roundPixels:i.roundPixels,maxTextures:i.maxTextures,maxTextureSize:i.maxTextureSize,batchSize:i.batchSize,maxLights:i.maxLights},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i<e.lostContextCallbacks.length;++i){var n=e.lostContextCallbacks[i];n[0].call(n[1],e)}},!1),this.canvas.addEventListener("webglcontextrestored",function(){e.contextLost=!1,e.init(e.config);for(var t=0;t<e.restoredContextCallbacks.length;++t){var i=e.restoredContextCallbacks[t];i[0].call(i[1],e)}},!1),this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this._tempMatrix4=new u,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e,i.context=e;for(var r=0;r<=27;r++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT;var a=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var h="WEBGL_compressed_texture_",u="WEBKIT_"+h;this.compression.ETC1=e.getExtension(h+"etc1")||e.getExtension(u+"etc1"),this.compression.PVRTC=e.getExtension(h+"pvrtc")||e.getExtension(u+"pvrtc"),this.compression.S3TC=e.getExtension(h+"s3tc")||e.getExtension(u+"s3tc"),this.supportedExtensions=a,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL);for(var c=0;c<this.currentTextures.length;++c)this.currentTextures[c]=null;return this.pipelines={},this.addPipeline("TextureTintPipeline",new g({game:i,renderer:this})),this.addPipeline("BitmapMaskPipeline",new f({game:i,renderer:this})),this.addPipeline("Light2D",new p({game:i,renderer:this,maxLights:t.maxLights})),this.setBlendMode(o.BlendModes.NORMAL),i.textures.once(l.READY,this.boot,this),this},boot:function(){for(var t in this.pipelines)this.pipelines[t].boot();var e=this.game.textures.getFrame("__DEFAULT");this.pipelines.TextureTintPipeline.currentFrame=e,this.blankTexture=e;var i=this.gl;i.bindFramebuffer(i.FRAMEBUFFER,null),i.enable(i.SCISSOR_TEST),this.setPipeline(this.pipelines.TextureTintPipeline),this.game.scale.on("resize",this.onResize,this);var n=this.game.scale.baseSize;this.resize(n.width,n.height,this.game.scale.resolution)},onResize:function(t,e,i,n){e.width===this.width&&e.height===this.height&&n===this.resolution||this.resize(e.width,e.height,n)},resize:function(t,e,i){var n=this.gl,s=this.pipelines;for(var r in this.width=t,this.height=e,this.resolution=i,n.viewport(0,0,t,e),s)s[r].resize(t,e,i);return this.drawingBufferHeight=n.drawingBufferHeight,n.scissor(0,n.drawingBufferHeight-e,t,e),this.defaultCamera.setSize(t,e),this},onContextRestored:function(t,e){return this.restoredContextCallbacks.push([t,e]),this},onContextLost:function(t,e){return this.lostContextCallbacks.push([t,e]),this},hasExtension:function(t){return!!this.supportedExtensions&&this.supportedExtensions.indexOf(t)},getExtension:function(t){return this.hasExtension(t)?(t in this.extensions||(this.extensions[t]=this.gl.getExtension(t)),this.extensions[t]):null},flush:function(){this.currentPipeline&&this.currentPipeline.flush()},hasPipeline:function(t){return t in this.pipelines},getPipeline:function(t){return this.hasPipeline(t)?this.pipelines[t]:null},removePipeline:function(t){return delete this.pipelines[t],this},addPipeline:function(t,e){return this.hasPipeline(t)?console.warn("Pipeline exists: "+t):this.pipelines[t]=e,e.name=t,this.pipelines[t].resize(this.width,this.height,this.config.resolution),e},pushScissor:function(t,e,i,n,s){void 0===s&&(s=this.drawingBufferHeight);var r=[t,e,i,n];return this.scissorStack.push(r),this.setScissor(t,e,i,n,s),this.currentScissor=r,r},setScissor:function(t,e,i,n,s){var r=this.gl,o=this.currentScissor,a=i>0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,h=s.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,a(e,i)&&(h=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,r,h,h,s.RGBA,t):this.createTexture2D(0,r,r,h,h,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){l=void 0===l||null===l||l;var u=this.gl,c=u.createTexture();return this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&h(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,c.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),a.alphaGL>0&&o.drawFillRect(e,i,n,r,c.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,c.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,c.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=c.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;l<r;l++){var u=s[l];if(u.willRender(n)){u.blendMode!==this.currentBlendMode&&this.setBlendMode(u.blendMode);var c=u.mask;c?(c.preRenderWebGL(this,u,n),u.renderWebGL(this,u,i,n),c.postRenderWebGL(this,u)):u.renderWebGL(this,u,i,n)}}this.setBlendMode(o.BlendModes.NORMAL),this.postRenderCamera(n)}},postRender:function(){if(!this.contextLost){this.flush();var t=this.snapshotState;t.callback&&(d(this.canvas,t),t.callback=null);var e=this.pipelines;for(var i in e)e[i].onPostRender()}},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,n,s,r,o){var a=this.snapshotState;return a.callback=s,a.type=r,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gl.drawingBufferWidth),a.height=Math.min(n,this.gl.drawingBufferHeight),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},canvasToTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl;if(e)this.setTexture2D(e,0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=t.width,e.height=t.height,this.setTexture2D(null,0);else{var s=n.CLAMP_TO_EDGE;!i&&a(t.width,t.height)&&(s=n.REPEAT);var r=this.config.antialias?n.LINEAR:n.NEAREST;e=this.createTexture2D(0,r,r,s,s,n.RGBA,t,t.width,t.height,!0)}return e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t in this.pipelines)this.pipelines[t].destroy(),delete this.pipelines[t];for(var e=0;e<this.nativeTextures.length;e++)this.deleteTexture(this.nativeTextures[e]),delete this.nativeTextures[e];delete this.gl,delete this.game,this.contextLost=!0,this.extensions={},this.nativeTextures.length=0}});t.exports=v},function(t,e,i){var n=i(60),s=i(388);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(24),s=i(32),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(458),s=i(40),r=i(0),o=i(28),a=i(457),h=i(101),l=i(130),u=i(41),c=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.scaleMode=t.config.antialias?h.LINEAR:h.NEAREST,this.gameCanvas=t.canvas,this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d"),this.currentContext=this.gameContext,this.blendModes=a(),this.currentScaleMode=0,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this._tempMatrix4=new u,this.init()},init:function(){this.game.scale.on("resize",this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.scaleMode===h.NEAREST&&l.disable(this.gameContext)},onContextLost:function(){},onContextRestored:function(){},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c,n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var d=0;d<o;d++){var f=r[d];f.willRender(n)&&(f.mask&&f.mask.preRenderCanvas(this,f,n),f.renderCanvas(this,f,i,n),f.mask&&f.mask.postRenderCanvas(this,f,n))}c.setTransform(1,0,0,1,0,0),c.globalCompositeOperation="source-over",c.globalAlpha=1,n.flashEffect.postRenderCanvas(c),n.fadeEffect.postRenderCanvas(c),n.dirty=!1,c.restore(),n.renderToTexture&&(n.emit(s.POST_RENDER,n),t.sys.context.drawImage(n.canvas,a,h))},postRender:function(){this.gameContext.restore();var t=this.snapshotState;t.callback&&(n(this.gameCanvas,t),t.callback=null)},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,t,e,i)},snapshotArea:function(t,e,i,n,s,r,o){var a=this.snapshotState;return a.callback=s,a.type=r,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gameCanvas.width),a.height=Math.min(n,this.gameCanvas.height),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},batchSprite:function(t,e,i,n){var s=i.alpha*t.alpha;if(0!==s){var r=this.currentContext,o=this._tempMatrix1,a=this._tempMatrix2,h=this._tempMatrix3,l=e.canvasData,u=l.x,c=l.y,d=e.cutWidth,f=e.cutHeight,p=e.source.resolution,g=-t.displayOriginX+e.x,v=-t.displayOriginY+e.y,y=t.flipX?-1:1,m=t.flipY?-1:1;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||e.updateCropUVs(x,t.flipX,t.flipY),d=x.cw,f=x.ch,u=x.cx,c=x.cy,g=-t.displayOriginX+x.x,v=-t.displayOriginY+x.y,-1===y&&(g>=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===m&&(v>=0?v=-(v+f):v<0&&(v=Math.abs(v)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.scale(y,m),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.drawImage(e.source.image,u,c,d,f,g,v,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e,i){var n=i(205),s=i(0),r=i(136),o=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once(r.REMOVE_ANIMATION,this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){return t instanceof n&&(t=t.key),this.nextAnim=t,this.parent},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),t instanceof n&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._startAnimation(t,i))},playReverse:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),t instanceof n&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,i))},_startAnimation:function(t,e){this.load(t,e);var i=this.currentAnim,n=this.parent;this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,i.showOnStart&&(n.visible=!0);var s=this.currentFrame;return i.emit(r.ANIMATION_START,i,s,n),n.emit(r.SPRITE_ANIMATION_KEY_START+t,i,s,n),n.emit(r.SPRITE_ANIMATION_START,i,s,n),n},reverse:function(){return this.isPlaying&&(this._reverse=!this._reverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=0,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){void 0===t&&(t=!1);var e=this.currentAnim;e.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(e.frames[0]);var i=this.parent,n=this.currentFrame;return e.emit(r.ANIMATION_RESTART,e,n,i),i.emit(r.SPRITE_ANIMATION_KEY_RESTART+e.key,e,n,i),i.emit(r.SPRITE_ANIMATION_RESTART,e,n,i),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent,e=this.currentAnim,i=this.currentFrame;if(e&&(e.emit(r.ANIMATION_COMPLETE,e,i,t),t.emit(r.SPRITE_ANIMATION_KEY_COMPLETE+e.key,e,i,t),t.emit(r.SPRITE_ANIMATION_COMPLETE,e,i,t)),this.nextAnim){var n=this.nextAnim;this.nextAnim=null,this.play(n)}return t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e){t.exports=function(t){return t.split("").reverse().join("")}},function(t,e){t.exports=function(t,e){return t.replace(/%([0-9]+)/g,function(t,i){return e[Number(i)-1]})}},function(t,e,i){t.exports={Format:i(462),Pad:i(193),Reverse:i(461),UppercaseFirst:i(330),UUID:i(299)}},function(t,e,i){var n=i(70);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)&&(i[s]=e[s]);return i}},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},function(t,e,i){var n=i(4),s=i(23);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e,i){t.exports={Clone:i(70),Extend:i(19),GetAdvancedValue:i(12),GetFastValue:i(2),GetMinMaxValue:i(466),GetValue:i(4),HasAll:i(465),HasAny:i(302),HasValue:i(91),IsPlainObject:i(8),Merge:i(103),MergeRight:i(464)}},function(t,e,i){t.exports={Array:i(174),Objects:i(467),String:i(463)}},function(t,e,i){var n=i(0),s=i(219),r=i(17),o=i(16),a=i(218),h=i(89),l=i(104),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.preUpdate,this),t.on(o.UPDATE,this.update,this),t.once(o.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(t){return a(this,t)},timeline:function(t){var e=a(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return l(this,t)},add:function(t){var e=l(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=s(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active,s=this._pending;for(t=0;t<i.length;t++){e=i[t];var r=n.indexOf(e);-1===r?(r=s.indexOf(e))>-1&&(e.state=h.REMOVED,s.splice(r,1)):(e.state=h.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t<i.length;t++)(e=i[t]).state===h.PENDING_ADD&&(e.init()?(e.play(),this._active.push(e)):this._pending.push(e));i.length=0,this._toProcess=0}},update:function(t,e){var i,n=this._active;e*=this.timeScale;for(var s=0;s<n.length;s++)(i=n[s]).update(t,e)&&(this._destroy.push(i),this._toProcess++)},makeActive:function(t){if(-1===this._add.indexOf(t)&&-1===this._active.indexOf(t)){var e=this._pending.indexOf(t);return-1!==e&&this._pending.splice(e,1),this._add.push(t),t.state=h.PENDING_ADD,this._toProcess++,this}},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[0]=this.list[s],t.apply(e,i)},getAllTweens:function(){for(var t=this._active,e=[],i=0;i<t.length;i++)e.push(t[i]);return e},getGlobalTimeScale:function(){return this.timeScale},getTweensOf:function(t){var e,i,n=this._active,s=[];if(Array.isArray(t))for(i=0;i<n.length;i++){e=n[i];for(var r=0;r<t.length;r++)e.hasTarget(t[r])&&s.push(e)}else for(i=0;i<n.length;i++)(e=n[i]).hasTarget(t)&&s.push(e);return s},isTweening:function(t){for(var e,i=this._active,n=0;n<i.length;n++)if((e=i[n]).hasTarget(t)&&e.isPlaying())return!0;return!1},killAll:function(){for(var t=this.getAllTweens(),e=0;e<t.length;e++)t[e].stop();return this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].stop();return this},pauseAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].pause();return this},resumeAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].resume();return this},setGlobalTimeScale:function(t){return this.timeScale=t,this},shutdown:function(){this.killAll(),this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0;var t=this.systems.events;t.off(o.PRE_UPDATE,this.preUpdate,this),t.off(o.UPDATE,this.update,this),t.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("TweenManager",u,"tweens"),t.exports=u},function(t,e){t.exports="update"},function(t,e){t.exports="start"},function(t,e){t.exports="resume"},function(t,e){t.exports="pause"},function(t,e){t.exports="loop"},function(t,e){t.exports="complete"},function(t,e){t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(t,e,i){t.exports={GetBoolean:i(90),GetEaseFunction:i(92),GetNewValue:i(105),GetProps:i(221),GetTargets:i(143),GetTweens:i(220),GetValueOp:i(142),NumberTweenBuilder:i(219),TimelineBuilder:i(218),TweenBuilder:i(104)}},function(t,e,i){var n=i(89),s=i(19),r={Builders:i(477),Events:i(216),TweenManager:i(469),Tween:i(140),TweenData:i(139),Timeline:i(217)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(0),s=i(17),r=i(16),o=i(222),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=Date.now(),this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e=new o(t);return this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,n){return this.addEvent({delay:t,callback:e,args:i,callbackScope:n})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i<t;i++){n=this._pendingRemoval[i];var s=this._active.indexOf(n);s>-1&&this._active.splice(s,1),n.destroy()}for(i=0;i<e;i++)n=this._pendingInsertion[i],this._active.push(n);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){if(this.now=t,!this.paused){e*=this.timeScale;for(var i=0;i<this._active.length;i++){var n=this._active[i];if(!n.paused&&(n.elapsed+=e*n.timeScale,n.elapsed>=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t<this._pendingInsertion.length;t++)this._pendingInsertion[t].destroy();for(t=0;t<this._active.length;t++)this._active[t].destroy();for(t=0;t<this._pendingRemoval.length;t++)this._pendingRemoval[t].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var e=this.systems.events;e.off(r.PRE_UPDATE,this.preUpdate,this),e.off(r.UPDATE,this.update,this),e.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});s.register("Clock",a,"time"),t.exports=a},function(t,e,i){t.exports={Clock:i(479),TimerEvent:i(222)}},function(t,e,i){var n=i(5),s=i(144);n.register("tilemap",function(t,e,i,n,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===n&&(n=void 0),null===r&&(r=void 0),s(this.scene,t,e,i,n,r,o,a)})},function(t,e,i){var n=i(14),s=i(144);n.register("tilemap",function(t){var e=void 0!==t?t:{};return s(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)})},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;u.globalAlpha=n.alpha*e.alpha;for(var f=0;f<o;f++){var p=r[f],g=c[p.index];if(g){var v=g.image.getSourceImage(),y=g.getTileTextureCoordinates(p.index);if(y){var m=g.tileWidth,x=g.tileHeight,T=m/2,w=x/2;u.save(),u.translate(p.pixelX+T,p.pixelY+w),0!==p.rotation&&u.rotate(p.rotation),(p.flipX||p.flipY)&&u.scale(p.flipX?-1:1,p.flipY?-1:1),u.globalAlpha=d*p.alpha,u.drawImage(v,y.x,y.y,m,x,-T,-w,m,x),u.restore()}}}u.restore()}}},function(t,e){t.exports=function(t,e,i,n){var s=e.tileset,r=e.pipeline,o=r.vertexBuffer;t.setPipeline(r),r.modelIdentity(),r.modelTranslate(e.x-n.scrollX*e.scrollFactorX,e.y-n.scrollY*e.scrollFactorY,0),r.modelScale(e.scaleX,e.scaleY,1),r.viewLoad2D(n.matrix.matrix);for(var a=0;a<s.length;a++)e.upload(n,a),e.vertexCount[a]>0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e,i){var n=i(1),s=i(1);n=i(484),s=i(483),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));for(var d=n.alpha*e.alpha,f=0;f<o;f++){var p=r[f],g=c[p.index];if(g){var v=g.image.getSourceImage(),y=g.getTileTextureCoordinates(p.index);if(y){var m=p.width/2,x=p.height/2;u.save(),u.translate(p.pixelX+m,p.pixelY+x),0!==p.rotation&&u.rotate(p.rotation),(p.flipX||p.flipY)&&u.scale(p.flipX?-1:1,p.flipY?-1:1),u.globalAlpha=d*p.alpha,u.drawImage(v,y.x,y.y,p.width,p.height,-m,-x,p.width,p.height),u.restore()}}}u.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s){e.cull(s);var r=e.culledTiles,o=r.length,a=s.alpha*e.alpha;if(!(0===o||a<=0))for(var h=e.gidMap,l=e.pipeline,u=n.getTintAppendFloatAlpha,c=e.scrollFactorX,d=e.scrollFactorY,f=e.x,p=e.y,g=e.scaleX,v=e.scaleY,y=e.tileset,m=0;m<y.length;m++)for(var x=y[m],T=x.glTexture,w=0;w<o;w++){var b=r[w],S=h[b.index];if(S===x){var _=S.getTileTextureCoordinates(b.index);if(null!==_){var A=b.width,E=b.height,C=_.x,M=_.y,P=.5*b.width,O=.5*b.height,R=u(b.tint,a*b.alpha);l.batchTexture(e,T,T.width,T.height,f+(P+b.pixelX)*g,p+(O+b.pixelY)*v,b.width,b.height,g,v,b.rotation,b.flipX,b.flipY,c,d,P,O,C,M,A,E,R,R,R,R,!1,0,0,s,null,!0)}}}}},function(t,e,i){var n=i(1),s=i(1);n=i(487),s=i(486),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(106);t.exports=function(t){for(var e=[],i=[],s=0;s<t.layer.length;s++){var r=t.layer[s],o=r.tilesetName;""!==o&&-1===i.indexOf(o)&&(i.push(o),e.push(new n(o,0,r.tilesize,r.tilesize,0,0)))}return e}},function(t,e,i){var n=i(84),s=i(61);t.exports=function(t,e){for(var i=[],r=0;r<t.layer.length;r++){for(var o=t.layer[r],a=new n({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:1===o.visible}),h=[],l=[],u=0;u<o.data.length;u++){for(var c=0;c<o.data[u].length;c++){var d,f=o.data[u][c]-1;d=f>-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(19);t.exports=function(t){for(var e,i,s,r,o,a=0;a<t.layers.length;a++){e=t.layers[a],r=null;for(var h=0;h<e.data.length;h++){o=e.data[h];for(var l=0;l<o.length;l++)null===(i=o[l])||i.index<0||(s=t.tiles[i.index][2],r=t.tilesets[s],i.width=r.tileWidth,i.height=r.tileHeight,r.tileProperties&&r.tileProperties[i.index-r.firstgid]&&(i.properties=n(i.properties,r.tileProperties[i.index-r.firstgid])))}}}},function(t,e){t.exports=function(t){for(var e=[],i=0;i<t.tilesets.length;i++)for(var n=t.tilesets[i],s=n.tileMargin,r=n.tileMargin,o=0,a=0,h=0,l=n.firstgid;l<n.firstgid+n.total&&(e[l]=[s,r,i],s+=n.tileWidth+n.tileSpacing,++o!==n.total)&&(++a!==n.columns||(s=n.tileMargin,r+=n.tileHeight+n.tileSpacing,a=0,++h!==n.rows));l++);return e}},function(t,e,i){var n=i(2),s=i(228),r=i(227);t.exports=function(t){for(var e=[],i=0;i<t.layers.length;i++)if("objectgroup"===t.layers[i].type){for(var o=t.layers[i],a=n(o,"offsetx",0),h=n(o,"offsety",0),l=[],u=0;u<o.objects.length;u++){var c=s(o.objects[u],a,h);l.push(c)}var d=new r(o);d.objects=l,e.push(d)}return e}},function(t,e,i){var n=i(91);t.exports=function(t,e){for(var i={},s=0;s<e.length;s++){var r=e[s];n(t,r)&&(i[r]=t[r])}return i}},function(t,e,i){var n=i(106),s=i(229),r=i(228);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h<t.tilesets.length;h++){var l=t.tilesets[h];if(l.source)console.warn("Phaser can't load external tilesets. Use the Embed Tileset button and then export the map again.");else if(l.image){var u=new n(l.name,l.firstgid,l.tilewidth,l.tileheight,l.margin,l.spacing);if(t.version>1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f<l.tiles.length;f++){var p=l.tiles[f];if(p.properties){var g={};p.properties.forEach(function(t){g[t.name]=t.value}),d[p.id]=g}if(p.objectgroup&&(c[p.id]={objectgroup:p.objectgroup},p.objectgroup.objects)){var v=p.objectgroup.objects.map(function(t){return r(t)});c[p.id].objectgroup.objects=v}p.animation&&(c.hasOwnProperty(p.id)?c[p.id].animation=p.animation:c[p.id]={animation:p.animation})}u.tileData=c,u.tileProperties=d}}else if(l.tileproperties&&(u.tileProperties=l.tileproperties),l.tiles)for(e in u.tileData=l.tiles,u.tileData){var y=u.tileData[e].objectgroup;if(y&&y.objects){var m=y.objects.map(function(t){return r(t)});u.tileData[e].objectgroup.objects=m}}u.updateTileData(l.imagewidth,l.imageheight),i.push(u)}else{var x=new s(l.name,l.firstgid,l.tilewidth,l.tileheight,l.margin,l.spacing,l.properties);for(e in l.tiles){var T=l.tiles[e].image,w=l.firstgid+parseInt(e,10);x.addImage(w,T)}o.push(x)}a&&(a.lastgid=l.firstgid-1),a=l}return{tilesets:i,imageCollections:o}}},function(t,e,i){var n=i(2);t.exports=function(t){for(var e=[],i=0;i<t.layers.length;i++)if("imagelayer"===t.layers[i].type){var s=t.layers[i];e.push({name:s.name,image:s.image,x:n(s,"offsetx",0)+s.x,y:n(s,"offsety",0)+s.y,alpha:s.opacity,visible:s.visible,properties:n(s,"properties",{})})}return e}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s<i;s+=4)n[s/4]=(e.charCodeAt(s)|e.charCodeAt(s+1)<<8|e.charCodeAt(s+2)<<16|e.charCodeAt(s+3)<<24)>>>0;return n}},function(t,e,i){var n=i(497),s=i(2),r=i(84),o=i(230),a=i(61);t.exports=function(t,e){for(var i=[],h=0;h<t.layers.length;h++)if("tilelayer"===t.layers[h].type){var l=t.layers[h];if(l.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+l.name+"'");else{l.encoding&&"base64"===l.encoding&&(l.data=n(l.data),delete l.encoding);for(var u=new r({name:l.name,x:s(l,"offsetx",0)+l.x,y:s(l,"offsety",0)+l.y,width:l.width,height:l.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:l.opacity,visible:l.visible,properties:s(l,"properties",{})}),c=0,d=[],f=[],p=0,g=l.data.length;p<g;p++){var v=o(l.data[p]);if(v.gid>0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e,i){t.exports={Parse:i(233),Parse2DArray:i(145),ParseCSV:i(232),Impact:i(226),Tiled:i(231)}},function(t,e,i){var n=i(54),s=i(53),r=i(3);t.exports=function(t,e,i,o,a,h){return void 0===o&&(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o){if(void 0!==r){var a,h=n(t,e,i,s,null,o),l=0;for(a=0;a<r.length;a++)l+=r[a].weight;if(!(l<=0))for(a=0;a<h.length;a++){for(var u=Math.random()*l,c=0,d=-1,f=0;f<r.length;f++)if(u<=(c+=r[f].weight)){var p=r[f].index;d=Array.isArray(p)?p[Math.floor(Math.random()*p.length)]:p;break}h[a].index=d}}}},function(t,e,i){var n=i(108),s=i(107),r=i(3);t.exports=function(t,e,i,o,a){return void 0===i&&(i=new r(0,0)),i.x=n(t,o,a),i.y=s(e,o,a),i}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l<h.length;l++)h[l]&&(h[l].index===t?h[l].index=e:h[l].index===e&&(h[l].index=t))}},function(t,e,i){var n=i(21),s=i(132);t.exports=function(t,e,i,r,o){var a=n(t,e,i,r,null,o),h=a.map(function(t){return t.index});s(h);for(var l=0;l<a.length;l++)a[l].index=h[l]}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a){for(var h=n(t,e,i,s,null,a),l=0;l<h.length;l++)h[l].setCollisionCallback(r,o)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s<r;s++)n.callbacks[t[s]]=null!==e?{callback:e,callbackContext:i}:void 0}},function(t,e,i){var n=i(62),s=i(37);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r<i.height;r++)for(var o=0;o<i.width;o++){var a=i.data[r][o];if(a){var h=a.getCollisionGroup();h&&h.objects&&h.objects.length>0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e,i){var n=i(62),s=i(37),r=i(91);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var l=o.data[a][h];if(l)for(var u in t)if(r(l.properties,u)){var c=t[u];Array.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++)l.properties[u]===c[d]&&n(l,e)}}i&&s(0,0,o.width,o.height,o)}},function(t,e,i){var n=i(62),s=i(37),r=i(146);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var l=o.data[a][h];l&&-1===t.indexOf(l.index)&&(n(l,e),r(l.index,e,o))}i&&s(0,0,o.width,o.height,o)}},function(t,e,i){var n=i(62),s=i(37),r=i(146);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!(t>e)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l<a.height;l++)for(var u=0;u<a.width;u++){var c=a.data[l][u];c&&c.index>=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(62),s=i(37),r=i(146);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a<t.length;a++)r(t[a],e,o);for(var h=0;h<o.height;h++)for(var l=0;l<o.width;l++){var u=o.data[h][l];u&&-1!==t.indexOf(u.index)&&n(u,e)}i&&s(0,0,o.width,o.height,o)}},function(t,e,i){var n=i(21),s=i(354),r=new s(105,210,231,150),o=new s(243,134,48,200),a=new s(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var s=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=n(0,0,i.width,i.height,null,i);t.translate(i.tilemapLayer.x,i.tilemapLayer.y),t.scale(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c<u.length;c++){var d=u[c],f=d.width,p=d.height,g=d.pixelX,v=d.pixelY,y=d.collides?h:s;null!==y&&(t.fillStyle(y.color,y.alpha/255),t.fillRect(g,v,f,p)),g+=1,v+=1,f-=2,p-=2,null!==l&&(t.lineStyle(1,l.color,l.alpha/255),d.faceTop&&t.lineBetween(g,v,g+f,v),d.faceRight&&t.lineBetween(g+f,v,g+f,v+p),d.faceBottom&&t.lineBetween(g,v+p,g+f,v+p),d.faceLeft&&t.lineBetween(g,v,g,v+p))}}},function(t,e,i){var n=i(234),s=i(54),r=i(53);t.exports=function(t,e,i,o,a,h){var l=s(t,!0,a,h),u=r(e,!0,a,h);return n(l,u,i,o,h)}},function(t,e,i){var n=i(21),s=i(172);t.exports=function(t,e,i,r,o,a){var h,l=n(t,e,i,r,null,a);if(void 0===o)for(o=[],h=0;h<l.length;h++)-1===o.indexOf(l[h].index)&&o.push(l[h].index);for(h=0;h<l.length;h++)l[h].index=s(o)}},function(t,e,i){var n=i(37),s=i(147);t.exports=function(t,e,i,r,o){if(!Array.isArray(t))return null;void 0===r&&(r=!0),Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l<a;l++)for(var u=0;u<h;u++){var c=t[l][u];s(c,e+u,i+l,!1,o)}r&&n(e-1,i-1,h+2,a+2,o)}},function(t,e,i){var n=i(147),s=i(54),r=i(53);t.exports=function(t,e,i,o,a,h){var l=s(e,!0,a,h),u=r(i,!0,a,h);return n(t,l,u,o,h)}},function(t,e,i){var n=i(235),s=i(54),r=i(53);t.exports=function(t,e,i,o){var a=s(t,!0,i,o),h=r(e,!0,i,o);return n(a,h,o)}},function(t,e,i){var n=i(21),s=i(54),r=i(53);t.exports=function(t,e,i,o,a,h,l){var u=s(t,!0,h,l),c=r(e,!0,h,l),d=Math.ceil(s(t+i,!1,h,l)),f=Math.ceil(r(e+o,!1,h,l));return n(u,c,d-u,f-c,a,l)}},function(t,e,i){var n=i(279),s=i(21),r=i(278),o=i(1),a=i(108),h=i(107),l=i(54),u=i(53),c=function(t,e){return r.RectangleToTriangle(e,t)};t.exports=function(t,e,i,d){if(void 0===t)return[];var f=o;t instanceof n.Circle?f=r.CircleToRectangle:t instanceof n.Rectangle?f=r.RectangleToRectangle:t instanceof n.Triangle?f=c:t instanceof n.Line&&(f=r.LineToRectangle);var p=l(t.left,!0,i,d),g=u(t.top,!0,i,d),v=Math.ceil(l(t.right,!1,i,d)),y=Math.ceil(u(t.bottom,!1,i,d)),m=Math.max(v-p,1),x=Math.max(y-g,1),T=s(p,g,m,x,e,d),w=d.tileWidth,b=d.tileHeight;d.tilemapLayer&&(w*=d.tilemapLayer.scaleX,b*=d.tilemapLayer.scaleY);for(var S=[],_=new n.Rectangle(0,0,w,b),A=0;A<T.length;A++){var E=T[A];_.x=a(E.x,i,d),_.y=h(E.y,i,d),f(t,_)&&S.push(E)}return S}},function(t,e,i){var n=i(109),s=i(54),r=i(53);t.exports=function(t,e,i,o,a){var h=s(t,!0,o,a),l=r(e,!0,o,a);return n(h,l,i,a)}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a,h){n(i,s,r,o,a,h).forEach(t,e)}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a,h){return n(i,s,r,o,a,h).find(t,e)||null}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1);var s,r,o,a=0;if(i){for(r=n.height-1;r>=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r<n.height;r++)for(s=0;s<n.width;s++)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}return null}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r,o,a,h){return n(i,s,r,o,a,h).filter(t,e)}},function(t,e,i){var n=i(21),s=i(37),r=i(62);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d<c.length;d++)c[d].index=t,r(c[d],u);h&&s(e-1,i-1,o+2,a+2,l)}},function(t,e,i){var n=i(98),s=i(375);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o,a,h,l=t.tilemapLayer.tilemap,u=t.tilemapLayer,c=t.data,d=t.width,f=t.height,p=Math.floor(l.tileWidth*u.scaleX),g=Math.floor(l.tileHeight*u.scaleY),v=0,y=d,m=0,x=f;if(!u.skipCull&&1===u.scrollFactorX&&1===u.scrollFactorY){var T=n(e.worldView.x-u.x,p,0,!0)-u.cullPaddingX,w=s(e.worldView.right-u.x,p,0,!0)+u.cullPaddingX,b=n(e.worldView.y-u.y,g,0,!0)-u.cullPaddingY,S=s(e.worldView.bottom-u.y,g,0,!0)+u.cullPaddingY;v=Math.max(0,T),y=Math.min(d,w),m=Math.max(0,b),x=Math.min(f,S)}if(0===r)for(a=m;a<x;a++)for(o=v;c[a]&&o<y;o++)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(1===r)for(a=m;a<x;a++)for(o=y;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=m;a--)for(o=v;c[a]&&o<y;o++)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(3===r)for(a=x;a>=m;a--)for(o=y;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(108),s=i(107),r=i(21),o=i(236);t.exports=function(t,e,i,a,h,l){void 0===i&&(i={}),Array.isArray(t)||(t=[t]);var u=l.tilemapLayer;void 0===a&&(a=u.scene),void 0===h&&(h=a.cameras.main);var c,d=r(0,0,l.width,l.height,null,l),f=[];for(c=0;c<d.length;c++){var p=d[c];if(-1!==t.indexOf(p.index)){i.x=n(p.x,h,l),i.y=s(p.y,h,l);var g=a.make.sprite(i);f.push(g)}}if("number"==typeof e)for(c=0;c<t.length;c++)o(t[c],e,0,0,l.width,l.height,l);else if(Array.isArray(e))for(c=0;c<t.length;c++)o(t[c],e[c],0,0,l.width,l.height,l);return f}},function(t,e,i){var n=i(21),s=i(37);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f<u.length;f++){var p=u[f].x+c,g=u[f].y+d;p>=0&&p<l.width&&g>=0&&g<l.height&&l.data[g][p]&&l.data[g][p].copy(u[f])}h&&s(o-1,a-1,i+2,r+2,l)}},function(t,e,i){t.exports={Components:i(110),Parsers:i(499),Formats:i(31),ImageCollection:i(229),ParseToTilemap:i(144),Tile:i(61),Tilemap:i(225),TilemapCreator:i(482),TilemapFactory:i(481),Tileset:i(106),LayerData:i(84),MapData:i(83),ObjectLayer:i(227),DynamicTilemapLayer:i(224),StaticTilemapLayer:i(223)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(19),s=i(530),r={Events:i(126),FilterMode:s,Frame:i(121),Parsers:i(319),Texture:i(175),TextureManager:i(321),TextureSource:i(320)};r=n(!1,r,s),t.exports=r},function(t,e,i){t.exports={List:i(120),Map:i(194),ProcessQueue:i(244),RTree:i(243),Set:i(102),Size:i(333)}},function(t,e,i){t.exports={SoundManagerCreator:i(328),Events:i(69),BaseSound:i(122),BaseSoundManager:i(123),WebAudioSound:i(322),WebAudioSoundManager:i(323),HTML5AudioSound:i(326),HTML5AudioSoundManager:i(327),NoAudioSound:i(324),NoAudioSoundManager:i(325)}},function(t,e,i){var n=i(23),s=i(0),r=i(16),o=i(2),a=i(17),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n),this},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(124),s=i(19),r={Events:i(16),SceneManager:i(332),ScenePlugin:i(534),Settings:i(329),Systems:i(176)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(19),s=i(178),r={Center:i(349),Events:i(334),Orientation:i(348),ScaleManager:i(335),ScaleModes:i(347),Zoom:i(346)};r=n(!1,r=n(!1,r=n(!1,r=n(!1,r,s.CENTER),s.ORIENTATION),s.SCALE_MODE),s.ZOOM),t.exports=r},function(t,e,i){var n=i(237),s=i(0),r=i(16),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){}});t.exports=o},function(t,e,i){t.exports={BasePlugin:i(237),DefaultPlugins:i(181),PluginCache:i(17),PluginManager:i(336),ScenePlugin:i(537)}},function(t,e,i){var n={};t.exports=n;var s=i(149),r=(i(209),i(36));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var n={};t.exports=n;var s=i(36);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i<r?s.warn("Plugin.register:",n.toString(e),"can not be downgraded to",n.toString(t)):t!==e&&s.warn("Plugin.register:",n.toString(t),"is already registered to different plugin object")}else n._registry[t.name]=t;return t},n.resolve=function(t){return n._registry[n.dependencyParse(t).name]},n.toString=function(t){return"string"==typeof t?t:(t.name||"anonymous")+"@"+(t.version||t.range||"0.0.0")},n.isPlugin=function(t){return t&&t.name&&t.version&&t.install},n.isUsed=function(t,e){return t.used.indexOf(e)>-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a<r.length;a+=1)if(r[a]!==t.name){var h=n.resolve(r[a]);h?n.isUsed(t,h.name)||(n.isFor(h,t)||(s.warn("Plugin.use:",n.toString(h),"is for",h.for,"but installed on",n.toString(t)+"."),h._warned=!0),h.install?h.install(t):(s.warn("Plugin.use:",n.toString(h),"does not specify an install function."),h._warned=!0),h._warned?(o.push("🔶 "+n.toString(h)),delete h._warned):o.push("✅ "+n.toString(h)),t.used.push(h.name)):o.push("❌ "+r[a])}o.length>0&&!h.silent&&s.info(o.join("  "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o<e[r].length;o+=1)n.dependencies(e[r][o],e);return e}},n.dependencyParse=function(t){return s.isString(t)?(/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(t)||s.warn("Plugin.dependencyParse:",t,"is not a valid dependency string."),{name:t.split("@")[0],range:t.split("@")[1]||"*"}):{name:t.name,range:t.range||t.version}},n.versionParse=function(t){/^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/.test(t)||s.warn("Plugin.versionParse:",t,"is not a valid version or range.");var e=t.split("-");t=e[0];var i=isNaN(Number(t[0])),n=i?t.substr(1):t,r=s.map(n.split("."),function(t){return Number(t)});return{isRange:i,version:n,range:t,operator:i?t[0]:"",parts:r,prerelease:e[1],number:1e8*r[0]+1e4*r[1]+r[2]}},n.versionSatisfies=function(t,e){e=e||"*";var i=n.versionParse(e),s=i.parts,r=n.versionParse(t),o=r.parts;if(i.isRange){if("*"===i.operator||"*"===t)return!0;if("~"===i.operator)return o[0]===s[0]&&o[1]===s[1]&&o[2]>=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n=i(1286);n.Body=i(72),n.Composite=i(149),n.World=i(539),n.Detector=i(543),n.Grid=i(1285),n.Pairs=i(1284),n.Pair=i(451),n.Query=i(1310),n.Resolver=i(1283),n.SAT=i(542),n.Constraint=i(209),n.Common=i(36),n.Engine=i(1282),n.Events=i(210),n.Sleeping=i(238),n.Plugin=i(540),n.Bodies=i(138),n.Composites=i(1289),n.Axes=i(546),n.Bounds=i(86),n.Svg=i(1308),n.Vector=i(87),n.Vertices=i(82),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(82),r=i(87);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlap<a.overlap?(h=o,l.axisBody=t):(h=a,l.axisBody=e),l.axisNumber=h.axisNumber}l.bodyA=t.id<e.id?t:e,l.bodyB=t.id<e.id?e:t,l.collided=!0,l.depth=h.overlap,l.parentA=l.bodyA.parent,l.parentB=l.bodyB.parent,t=l.bodyA,e=l.bodyB,r.dot(h.axis,r.sub(e.position,t.position))<0?l.normal={x:h.axis.x,y:h.axis.y}:l.normal={x:-h.axis.x,y:-h.axis.y},l.tangent=r.perp(l.normal),l.penetration=l.penetration||{},l.penetration.x=l.normal.x*l.depth,l.penetration.y=l.normal.y*l.depth;var y=n._findSupports(t,e,l.normal),m=[];if(s.contains(t.vertices,y[0])&&m.push(y[0]),s.contains(t.vertices,y[1])&&m.push(y[1]),m.length<2){var x=n._findSupports(e,t,r.neg(l.normal));s.contains(e.vertices,x[0])&&m.push(x[0]),m.length<2&&s.contains(e.vertices,x[1])&&m.push(x[1])}return m.length<1&&(m=[y[0]]),l.supports=m,l},n._overlapAxes=function(t,e,i){for(var s,o,a=r._temp[0],h=r._temp[1],l={overlap:Number.MAX_VALUE},u=0;u<i.length;u++){if(o=i[u],n._projectToAxis(a,t,o),n._projectToAxis(h,e,o),(s=Math.min(a.max-h.min,h.max-a.min))<=0)return l.overlap=s,l;s<l.overlap&&(l.overlap=s,l.axis=o,l.axisNumber=u)}return l},n._projectToAxis=function(t,e,i){for(var n=r.dot(e[0],i),s=n,o=1;o<e.length;o+=1){var a=r.dot(e[o],i);a>s?s=a:a<n&&(n=a)}t.min=n,t.max=s},n._findSupports=function(t,e,i){for(var n,s,o,a,h=Number.MAX_VALUE,l=r._temp[0],u=e.vertices,c=t.position,d=0;d<u.length;d++)s=u[d],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))<h&&(h=n,o=s);return s=u[o.index-1>=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))<h&&(a=s),[o,a]}},function(t,e,i){var n={};t.exports=n;var s=i(542),r=i(451),o=i(86);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l<t.length;l++){var u=t[l][0],c=t[l][1];if((!u.isStatic&&!u.isSleeping||!c.isStatic&&!c.isSleeping)&&n.canCollide(u.collisionFilter,c.collisionFilter)&&(h.midphaseTests+=1,o.overlaps(u.bounds,c.bounds)))for(var d=u.parts.length>1?1:0;d<u.parts.length;d++)for(var f=u.parts[d],p=c.parts.length>1?1:0;p<c.parts.length;p++){var g=c.parts[p];if(f===u&&g===c||o.overlaps(f.bounds,g.bounds)){var v,y=a[r.id(f,g)];v=y&&y.isActive?y.collision:null;var m=s.collides(f,g,v);h.narrowphaseTests+=1,m.reused&&(h.narrowReuseCount+=1),m.collided&&(i.push(m),h.narrowDetections+=1)}}}return i},n.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n=i(138),s=i(72),r=i(0),o=i(452),a=i(2),h=i(91),l=i(82),u=new r({Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=a(i,"body",null),s=a(i,"addToWorld",!0);if(n)this.setBody(n,s);else{var r=e.getCollisionGroup();a(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f<c.length;f++){var p=c[f],g=r+p.x*e,v=o+p.y*i,y=p.width*e,m=p.height*i,x=null;if(p.rectangle)x=n.rectangle(g+y/2,v+m/2,y,m,t);else if(p.ellipse)x=n.circle(g+y/2,v+m/2,y/2,t);else if(p.polygon||p.polyline){var T=(p.polygon?p.polygon:p.polyline).map(function(t){return{x:t.x*e,y:t.y*i}}),w=l.create(T),b=l.centre(w);g+=b.x,v+=b.y,x=n.fromVertices(g,v,w,t)}x&&d.push(x)}return 1===d.length?this.setBody(d[0],t.addToWorld):d.length>1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){t.exports={AFTER_UPDATE:i(1322),BEFORE_UPDATE:i(1321),COLLISION_ACTIVE:i(1320),COLLISION_END:i(1319),COLLISION_START:i(1318),PAUSE:i(1317),RESUME:i(1316),SLEEP_END:i(1315),SLEEP_START:i(1314)}},function(t,e,i){var n={};t.exports=n;var s=i(87),r=i(36);n.fromVertices=function(t){for(var e={},i=0;i<t.length;i++){var n=(i+1)%t.length,o=s.normalise({x:t[n].y-t[i].y,y:t[i].x-t[n].x}),a=0===o.y?1/0:o.x/o.y;e[a=a.toFixed(3).toString()]=o}return r.values(e)},n.rotate=function(t,e){if(0!==e)for(var i=Math.cos(e),n=Math.sin(e),s=0;s<t.length;s++){var r,o=t[s];r=o.x*i-o.y*n,o.y=o.x*n+o.y*i,o.x=r}}},function(t,e,i){t.exports={Acceleration:i(1351),BodyScale:i(1350),BodyType:i(1349),Bounce:i(1348),CheckAgainst:i(1347),Collides:i(1346),Debug:i(1345),Friction:i(1344),Gravity:i(1343),Offset:i(1342),SetGameObject:i(1341),Velocity:i(1340)}},function(t,e,i){t.exports={COLLIDE:i(1355),PAUSE:i(1354),RESUME:i(1353)}},function(t,e,i){var n=i(245);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){var n=i(246);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(551);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y<s&&(o=t.y-s)<-r&&(o=0):t.deltaY()>0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(553);t.exports=function(t,e,i,s,r){var o=0;return t.deltaX()<0&&!t.blocked.left&&e.collideRight&&t.checkCollision.left?e.faceRight&&t.x<s&&(o=t.x-s)<-r&&(o=0):t.deltaX()>0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e,i){var n=i(554),s=i(552),r=i(242);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()<e.deltaAbsY()&&(m=-1),0!==e.deltaX()&&0!==e.deltaY()&&f&&p&&(y=Math.min(Math.abs(e.position.x-c),Math.abs(e.right-l)),m=Math.min(Math.abs(e.position.y-d),Math.abs(e.bottom-u))),y<m){if(f&&0!==(g=n(e,i,l,c,h))&&!r(o,e))return!0;p&&(v=s(e,i,u,d,h))}else{if(p&&0!==(v=s(e,i,u,d,h))&&!r(o,e))return!0;f&&(g=n(e,i,l,c,h))}return 0!==g||0!==v}},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e){t.exports="worldbounds"},function(t,e){t.exports="tileoverlap"},function(t,e){t.exports="tilecollide"},function(t,e){t.exports="resume"},function(t,e){t.exports="pause"},function(t,e){t.exports="overlap"},function(t,e){t.exports="collide"},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e,i){var n=i(0),s=i(34),r=i(56),o=i(384),a=i(255),h=i(2),l=i(103),u=i(17),c=i(16),d=i(3),f=i(250),p=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(c.BOOT,this.boot,this),t.sys.events.on(c.START,this.start,this)},boot:function(){this.world=new f(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(c.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new f(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;t.on(c.UPDATE,this.world.update,this.world),t.on(c.POST_UPDATE,this.world.postUpdate,this.world),t.once(c.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.world.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.world.collideObjects(t,e,i,n,s,!1)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,s,r){void 0===n&&(n=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,n),void 0!==s&&void 0!==r&&t.body.maxVelocity.set(s,r),o},accelerateToObject:function(t,e,i,n,s){return this.accelerateTo(t,e.x,e.y,i,n,s)},closest:function(t){for(var e=this.world.tree.all(),i=Number.MAX_VALUE,n=null,s=t.x,r=t.y,a=e.length-1;a>=0;a--){var h=e[a],l=o(s,r,h.x,h.y);l<i&&(n=h,i=l)}return n},furthest:function(t){for(var e=this.world.tree.all(),i=-1,n=null,s=t.x,r=t.y,a=e.length-1;a>=0;a--){var h=e[a],l=o(s,r,h.x,h.y);l>i&&(n=h,i=l)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new d),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new d),i.setToPolar(t,e)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(c.UPDATE,this.world.update,this.world),t.off(c.POST_UPDATE,this.world.postUpdate,this.world),t.off(c.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(c.START,this.start,this),this.scene=null,this.systems=null}});u.register("ArcadePhysics",p,"arcadePhysics"),t.exports=p},function(t,e,i){var n=i(38),s=i(19),r={ArcadePhysics:i(576),Body:i(249),Collider:i(247),Factory:i(255),Group:i(252),Image:i(254),Sprite:i(111),StaticBody:i(241),StaticGroup:i(251),World:i(250)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(0),s=i(15),r=i(102),o=i(11),a=i(75),h=i(7),l=i(2),u=i(17),c=i(16),d=i(112),f=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=d(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,t.sys.events.once(c.BOOT,this.boot,this),t.sys.events.on(c.START,this.pluginStart,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(c.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];this.keyExists(i)||(this.list.set(i),this.emit(a.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(t){var e=t.hasCacheConflict();return e||this.list.iterate(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}),!e&&this.isLoading()&&(this.inflight.iterate(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}),this.queue.iterate(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),e},addPack:function(t,e){e&&t.hasOwnProperty(e)&&(t={packKey:t[e]});var i=0,n=this.baseURL,s=this.path,r=this.prefix;for(var o in t){var a=t[o],h=l(a,"baseURL",n),u=l(a,"path",s),c=l(a,"prefix",r),d=l(a,"files",null),f=l(a,"defaultType","void");if(Array.isArray(d)){this.setBaseURL(h),this.setPath(u),this.setPrefix(c);for(var p=0;p<d.length;p++){var g=d[p],v=g.hasOwnProperty("type")?g.type:f;this[v]&&(this[v](g),i++)}}}return this.setBaseURL(n),this.setPath(s),this.setPrefix(r),i>0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(t){if((t.state===s.FILE_POPULATED||t.state===s.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(t),this.list.delete(t),t.crossOrigin||(t.crossOrigin=this.crossOrigin),t.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(t,e){this.inflight&&(this.inflight.delete(t),this.updateProgress(),e?(this.totalComplete++,this.queue.set(t),this.emit(a.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit(a.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===s.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===s.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&t.multiFile.addToCache():t.addToCache()),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(a.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=s.LOADER_COMPLETE,this.systems.events.off(c.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(a.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(t)},saveJSON:function(t,e){return this.save(JSON.stringify(t),e)},save:function(t,e,i){void 0===e&&(e="file.json"),void 0===i&&(i="application/json");var n=new Blob([t],{type:i}),s=URL.createObjectURL(n),r=document.createElement("a");return r.download=e,r.textContent="Download "+e,r.href=s,r.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var t=this.systems.game.config,e=this.systems.settings.loader;this.setBaseURL(l(e,"baseURL",t.loaderBaseURL)),this.setPath(l(e,"path",t.loaderPath)),this.setPrefix(l(e,"prefix",t.loaderPrefix)),this.state=s.LOADER_IDLE},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=s.LOADER_DESTROYED,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});u.register("Loader",f,"load"),t.exports=f},function(t,e,i){var n=i(0),s=i(7),r=i(2),o=i(64),a=i(8),h=i(63),l=i(256),u=new n({Extends:h,initialize:function(t,e,i,n,s,u){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","txt"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,s),d=new l(t,e,n,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("unityAtlas",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},function(t,e,i){var n=i(0),s=i(7),r=i(55),o=i(31),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});s.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this}),t.exports=a},function(t,e,i){var n=i(0),s=i(7),r=i(55),o=i(31),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});s.register("tilemapImpact",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this}),t.exports=a},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=i(31),u=new n({Extends:r,initialize:function(t,e,i,n){var s="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});o.register("tilemapCSV",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"svgConfig",{}),s=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,o=this.config.scale;t:if(i&&n||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0  0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,n=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",n.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this,p=!1;this.data.onload=function(){p||r.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){p?f.onProcessError():(p=!0,r.revokeObjectURL(f.data),f.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("svg",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i,n));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(7),r=i(64),o=new n({Extends:r,initialize:function(t,e,i,n,s){r.call(this,t,e,i,s,n),this.type="spritesheet"},addToCache:function(){var t=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(t)}});s.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n));return this}),t.exports=o},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n){var s="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"script",cache:!1,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),n=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:n,sceneKey:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===s.FILE_POPULATED?t.installScenePlugin(n,this.data,r,this.loader.scene):(this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(n,window[this.key],r,this.loader.scene)),this.onProcessComplete()}});o.register("scenePlugin",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n,s));return this}),t.exports=l},function(module,exports,__webpack_require__){var Class=__webpack_require__(0),CONST=__webpack_require__(15),File=__webpack_require__(22),FileTypesManager=__webpack_require__(7),GetFastValue=__webpack_require__(2),IsPlainObject=__webpack_require__(8),SceneFile=new Class({Extends:File,initialize:function(t,e,i,n){var s="js";if(IsPlainObject(e)){var r=e;e=GetFastValue(r,"key"),i=GetFastValue(r,"url"),n=GetFastValue(r,"xhrSettings"),s=GetFastValue(r,"extension",s)}var o={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};File.call(this,t,o)},onProcess:function(){this.state=CONST.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var code=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);");this.loader.sceneManager.add(this.key,eval(code)),this.complete=!0}});FileTypesManager.register("sceneFile",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new SceneFile(this,t[n]));else this.addFile(new SceneFile(this,t,e,i));return this}),module.exports=SceneFile},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),n=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:n,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),n=a(e,"mapping",null);if(this.state===s.FILE_POPULATED)t.install(this.key,this.data,i,n);else{this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,n);(i||n)&&(this.loader.systems[n]=r,this.loader.scene[n]=r)}this.onProcessComplete()}});o.register("plugin",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n,s));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(15),r=i(7),o=i(55),a=new n({Extends:o,initialize:function(t,e,i,n,s){o.call(this,t,e,i,n,s),this.type="packfile"},onProcess:function(){this.state!==s.FILE_POPULATED&&(this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new a(this,t[s]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},function(t,e,i){var n=i(0),s=i(7),r=i(2),o=i(64),a=i(8),h=i(55),l=i(63),u=new n({Extends:l,initialize:function(t,e,i,n,s,o,u){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url"),o=r(c,"xhrSettings"),n=r(c,"path"),s=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=n,this.config.baseURL=s,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,n=this.loader,s=n.baseURL,a=n.path,h=n.prefix,l=r(i,"baseURL",s),u=r(i,"path",a),c=r(i,"prefix",h),d=r(i,"textureXhrSettings");n.setBaseURL(l),n.setPath(u),n.setPrefix(c);for(var f=0;f<e.length;f++){var p=e[f].image,g="_MA_"+p,v=new o(n,g,p,d);if(this.addToMultiFile(v),n.addFile(v),e[f].normalMap){var y=new o(n,g,e[f].normalMap,d);y.type="normalMap",v.setLink(y),this.addToMultiFile(y),n.addFile(y)}}n.setBaseURL(s),n.setPath(a),n.setPrefix(h)}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0];t.addToCache();for(var e=[],i=[],n=[],s=1;s<this.files.length;s++){var r=this.files[s];if("normalMap"!==r.type)for(var o=r.key.substr(4),a=r.data,h=0;h<t.data.textures.length;h++){var l=t.data.textures[h];if(l.image===o){i.push(a),e.push(l),r.linkFile&&n.push(r.linkFile.data);break}}}for(0===n.length&&(n=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,n),this.complete=!0,s=0;s<this.files.length;s++)this.files[s].pendingDestroy()}}});s.register("multiatlas",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n,s,o){void 0===n&&(n=512),void 0===s&&(s=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),n=a(u,"width",n),s=a(u,"height",s)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:n,height:s}};r.call(this,t,c)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push('<svg width="'+t+'px" height="'+e+'px" viewBox="0 0 '+t+" "+e+'" xmlns="http://www.w3.org/2000/svg">'),i.push('<foreignObject width="100%" height="100%">'),i.push('<body xmlns="http://www.w3.org/1999/xhtml">'),i.push(this.xhrLoader.responseText),i.push("</body>"),i.push("</foreignObject>"),i.push("</svg>");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n,s));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n){var s="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",cache:t.cacheManager.html,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n){var s="glsl";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"glsl",cache:t.cacheManager.shader,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("glsl",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},function(t,e,i){var n=i(0),s=i(7),r=i(2),o=i(64),a=i(8),h=i(63),l=i(314),u=i(150),c=new n({Extends:h,initialize:function(t,e,i,n,s,l){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new u(t,{key:e,url:r(f,"fontDataURL"),extension:r(f,"fontDataExtension","xml"),xhrSettings:r(f,"fontDataXhrSettings")})}else c=new o(t,e,i,s),d=new u(t,e,n,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.loader.cacheManager.bitmapFont.add(t.key,{data:l(e.data),texture:t.key,frame:null}),this.complete=!0}}});s.register("bitmapFont",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new c(this,t[o]),this.addFile(r.files);else r=new c(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=c},function(t,e,i){var n=i(0),s=i(15),r=i(22),o=i(7),a=i(2),h=i(8),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"xhrSettings"),o=a(l,"extension",o),s=a(l,"dataType",s)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:s}};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,n,i));return this}),t.exports=l},function(t,e,i){var n=i(258),s=i(0),r=i(7),o=i(2),a=i(8),h=i(55),l=i(63),u=new s({Extends:l,initialize:function(t,e,i,s,r,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),s=o(d,"audioURL"),r=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var f;if(s){var p=n.create(t,e,s,r,u);p&&(f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p,f]),this.config.resourceLoad=!1)}else f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),s=o(this.config,"audioXhrSettings"),r=n.create(this.loader,t.key,e,i,s);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",function(t,e,i,n,s,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c<t.length;c++)(o=new u(this,t[c])).files&&this.addFile(o.files);else(o=new u(this,t,e,i,n,s,r)).files&&this.addFile(o.files);return this})},function(t,e,i){var n=i(0),s=i(7),r=i(2),o=i(64),a=i(8),h=i(63),l=i(150),u=new n({Extends:h,initialize:function(t,e,i,n,s,u){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","xml"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,s),d=new l(t,e,n,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("atlasXML",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},function(t,e,i){var n=i(0),s=i(7),r=i(2),o=i(64),a=i(8),h=i(55),l=i(63),u=new n({Extends:l,initialize:function(t,e,i,n,s,u){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,s),d=new h(t,e,n,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("atlas",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},function(t,e,i){var n=i(0),s=i(7),r=i(55),o=i(75),a=new n({Extends:r,initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data),this.pendingDestroy()}});s.register("animation",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new a(this,t[s]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},function(t,e,i){t.exports={AnimationJSONFile:i(599),AtlasJSONFile:i(598),AtlasXMLFile:i(597),AudioFile:i(258),AudioSpriteFile:i(596),BinaryFile:i(595),BitmapFontFile:i(594),GLSLFile:i(593),HTML5AudioFile:i(257),HTMLFile:i(592),HTMLTextureFile:i(591),ImageFile:i(64),JSONFile:i(55),MultiAtlasFile:i(590),PackFile:i(589),PluginFile:i(588),SceneFile:i(587),ScenePluginFile:i(586),ScriptFile:i(585),SpriteSheetFile:i(584),SVGFile:i(583),TextFile:i(256),TilemapCSVFile:i(582),TilemapImpactFile:i(581),TilemapJSONFile:i(580),UnityAtlasFile:i(579),XMLFile:i(150)}},function(t,e,i){var n=i(15),s=i(19),r={Events:i(75),FileTypes:i(600),File:i(22),FileTypesManager:i(7),GetURL:i(152),LoaderPlugin:i(578),MergeXHRSettings:i(151),MultiFile:i(63),XHRLoader:i(259),XHRSettings:i(112)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={TouchManager:i(337)}},function(t,e,i){t.exports={MouseManager:i(339)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isUp&&t.duration<e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration<e}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e,i){var n=i(125),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e,i){var n=i(610);t.exports=function(t,e){if(e.matched)return!0;var i=!1,s=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e,i){var n=i(0),s=i(11),r=i(113),o=i(26),a=i(4),h=i(52),l=i(114),u=i(261),c=i(125),d=i(260),f=i(608),p=i(98),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.time=0,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s<t.length;s++){var r=t[s].trim();r&&(n[r]=this.addKey(r,e,i))}}else for(var o in t)n[o]=this.addKey(t[o],e,i);return n},addKey:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n=this.keys;if(t instanceof u){var s=n.indexOf(t);return s>-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t){var e=this.keys;if(t instanceof u){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return e[t]&&(e[t]=void 0),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.manager.queue,i=e.length;if(this.isActive()&&0!==i)for(var n=this.keys,s=0;s<i;s++){var o=e[s],a=o.keyCode,h=n[a],l=!1;void 0===o.cancelled&&(o.cancelled=0,o.stopImmediatePropagation=function(){o.cancelled=1},o.stopPropagation=function(){o.cancelled=-1}),-1!==o.cancelled&&("keydown"===o.type?(h&&(l=h.isDown,h.onDown(o)),o.cancelled||h&&l||(f[a]&&(this.emit(r.KEY_DOWN+f[a],o),this.emit("keydown_"+f[a],o)),o.cancelled||this.emit(r.ANY_KEY_DOWN,o))):(h&&h.onUp(o),o.cancelled||(f[a]&&(this.emit(r.KEY_UP+f[a],o),this.emit("keyup_"+f[a],o)),o.cancelled||this.emit(r.ANY_KEY_UP,o))),1===o.cancelled&&(o.cancelled=0))}},resetKeys:function(){for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].reset();return this},shutdown:function(){this.resetKeys(),this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.off(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.off(h.MANAGER_PROCESS,this.update,this),this.game.events.off(o.BLUR,this.resetKeys),this.removeAllListeners(),this.queue=[]},destroy:function(){this.shutdown();for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null}});l.register("KeyboardPlugin",g,"keyboard","keyboard","inputKeyboard"),t.exports=g},function(t,e){t.exports="up"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="down"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keydown"},function(t,e,i){t.exports={Events:i(113),KeyboardManager:i(340),KeyboardPlugin:i(612),Key:i(261),KeyCodes:i(125),KeyCombo:i(260),JustDown:i(607),JustUp:i(606),DownDuration:i(605),UpDuration:i(604)}},function(t,e){t.exports=function(t,e){return function(i,n,s,r){var o=t.getPixelAlpha(n,s,r.texture.key,r.frame.name);return o&&o>=e}}},function(t,e,i){var n=i(77),s=i(43),r=i(0),o=i(265),a=i(621),h=i(56),l=i(96),u=i(95),c=i(52),d=i(11),f=i(2),p=i(114),g=i(8),v=i(17),y=i(10),m=i(42),x=i(16),T=i(65),w=i(74),b=new r({Extends:d,initialize:function(t){d.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new d,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once(x.BOOT,this.boot,this),t.sys.events.on(x.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(x.DESTROY,this.destroy,this),this.pluginEvents.emit(c.BOOT)},start:function(){var t=this.systems.events;t.on(x.TRANSITION_START,this.transitionIn,this),t.on(x.TRANSITION_OUT,this.transitionOut,this),t.on(x.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(x.PRE_UPDATE,this.preUpdate,this),this.manager.useQueue&&t.on(x.UPDATE,this.update,this),t.once(x.SHUTDOWN,this.shutdown,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(c.START)},preUpdate:function(){this.pluginEvents.emit(c.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r<i;r++){var o=t[r],a=s.indexOf(o);a>-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){var i=this.manager;if(this.pluginEvents.emit(c.UPDATE,t,e),!i.globalTopOnly||!i.ignoreEvents){if(i._emitIsOverEvent){var n=i.isOver?c.GAME_OVER:c.GAME_OUT;this.emit(n,t,i._emitIsOverEvent)}var s=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s)for(var r=this.manager.pointers,o=this.manager.pointersTotal,a=0;a<o;a++){var h=r[a];this._tempZones=[],this._temp=this.hitTestPointer(h),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var l=this.processDragEvents(h,t);(o<3||!h.wasTouch)&&(l+=this.processOverOutEvents(h)),h.justDown&&(l+=this.processDownEvents(h)),h.justMoved&&(l+=this.processMoveEvents(h)),h.justUp&&(l+=this.processUpEvents(h)),l>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,this.manager.resetCursor(e),t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i<e.length;i++){for(var n=e[i],s=this.manager.hitTest(t,this._list,n),r=0;r<s.length;r++){var o=s[r];o.input.dropZone&&this._tempZones.push(o)}if(s.length>0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(c.GAMEOBJECT_POINTER_DOWN,t,a.input.localX,a.input.localY,s),n.cancelled){r=!0;break}if(this.emit(c.GAMEOBJECT_DOWN,t,a,s),n.cancelled){r=!0;break}}}return r||(t.downElement===this.manager.game.canvas?this.emit(c.POINTER_DOWN,t,i):this.emit(c.POINTER_DOWN_OUTSIDE,t)),e},getDragState:function(t){return this._dragState[t.id]},setDragState:function(t,e){this._dragState[t.id]=e},processDragEvents:function(t,e){if(0===this._draggable.length)return 0;var i,n,s,r,o=this._temp;if(0===this.getDragState(t)&&t.primaryDown&&t.justDown&&o.length>0?this.setDragState(t,1):this.getDragState(t)>0&&!t.primaryDown&&t.justUp&&this.setDragState(t,5),1===this.getDragState(t)){var a=[];for(i=0;i<o.length;i++)(n=o[i]).input.draggable&&0===n.input.dragState&&a.push(n);if(0===a.length)return this.setDragState(t,0),0;a.length>1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?this.setDragState(t,3):this.setDragState(t,2)}if(2===this.getDragState(t)&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&this.setDragState(t,3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&this.setDragState(t,3)),3===this.getDragState(t)){for(s=this._drag[t.id],i=0;i<s.length;i++)(r=(n=s[i]).input).dragState=2,r.dragX=t.x-n.x,r.dragY=t.y-n.y,r.dragStartX=n.x,r.dragStartY=n.y,n.emit(c.GAMEOBJECT_DRAG_START,t,r.dragX,r.dragY),this.emit(c.DRAG_START,t,n);return this.setDragState(t,4),s.length}if(4===this.getDragState(t)&&t.justMoved&&!t.justUp){var l=this._tempZones;for(s=this._drag[t.id],i=0;i<s.length;i++){if((r=(n=s[i]).input).target){var u=l.indexOf(r.target);0===u?(n.emit(c.GAMEOBJECT_DRAG_OVER,t,r.target),this.emit(c.DRAG_OVER,t,n,r.target)):u>0?(n.emit(c.GAMEOBJECT_DRAG_LEAVE,t,r.target),this.emit(c.DRAG_LEAVE,t,n,r.target),r.target=l[0],n.emit(c.GAMEOBJECT_DRAG_ENTER,t,r.target),this.emit(c.DRAG_ENTER,t,n,r.target)):(n.emit(c.GAMEOBJECT_DRAG_LEAVE,t,r.target),this.emit(c.DRAG_LEAVE,t,n,r.target),l[0]?(r.target=l[0],n.emit(c.GAMEOBJECT_DRAG_ENTER,t,r.target),this.emit(c.DRAG_ENTER,t,n,r.target)):r.target=null)}else!r.target&&l[0]&&(r.target=l[0],n.emit(c.GAMEOBJECT_DRAG_ENTER,t,r.target),this.emit(c.DRAG_ENTER,t,n,r.target));var d=t.x-n.input.dragX,f=t.y-n.input.dragY;n.emit(c.GAMEOBJECT_DRAG,t,d,f),this.emit(c.DRAG,t,n,d,f)}return s.length}if(5===this.getDragState(t)){for(s=this._drag[t.id],i=0;i<s.length;i++)if(2===(r=(n=s[i]).input).dragState){r.dragState=0,r.dragX=r.localX-n.displayOriginX,r.dragY=r.localY-n.displayOriginY;var p=!1;r.target&&(n.emit(c.GAMEOBJECT_DROP,t,r.target),this.emit(c.DROP,t,n,r.target),r.target=null,p=!0),n.emit(c.GAMEOBJECT_DRAG_END,t,r.dragX,r.dragY,p),this.emit(c.DRAG_END,t,n,p)}this.setDragState(t,0),s.splice(0)}return 0},processMoveEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(c.GAMEOBJECT_POINTER_MOVE,t,a.input.localX,a.input.localY,s),n.cancelled){r=!0;break}if(this.emit(c.GAMEOBJECT_MOVE,t,a,s),n.cancelled){r=!0;break}if(this.topOnly)break}}return r||this.emit(c.POINTER_MOVE,t,i),e},processOverOutEvents:function(t){var e,i,n=this._temp,s=[],r=[],o=[],a=this._over[t.id],h=this._drag[t.id],l=this.manager;for(e=0;e<a.length;e++)i=a[e],-1===n.indexOf(i)&&-1===h.indexOf(i)?s.push(i):o.push(i);for(e=0;e<n.length;e++)i=n[e],-1===a.indexOf(i)&&r.push(i);var u=s.length,d=0,f=this._eventData,p=this._eventContainer;f.cancelled=!1;var g=!1;if(u>0){for(this.sortGameObjects(s),e=0;e<u;e++)if((i=s[e]).input){if(i.emit(c.GAMEOBJECT_POINTER_OUT,t,p),l.resetCursor(i.input),d++,f.cancelled){g=!0;break}if(this.emit(c.GAMEOBJECT_OUT,t,i,p),f.cancelled){g=!0;break}}g||this.emit(c.POINTER_OUT,t,s)}if(u=r.length,f.cancelled=!1,g=!1,u>0){for(this.sortGameObjects(r),e=0;e<u;e++)if((i=r[e]).input){if(i.emit(c.GAMEOBJECT_POINTER_OVER,t,i.input.localX,i.input.localY,p),l.setCursor(i.input),d++,f.cancelled){g=!0;break}if(this.emit(c.GAMEOBJECT_OVER,t,i,p),f.cancelled){g=!0;break}}g||this.emit(c.POINTER_OVER,t,r)}return a=o.concat(r),this._over[t.id]=this.sortGameObjects(a),d},processUpEvents:function(t){var e=this._temp,i=this._eventData,n=this._eventContainer;i.cancelled=!1;for(var s=!1,r=0;r<e.length;r++){var o=e[r];if(o.input){if(o.emit(c.GAMEOBJECT_POINTER_UP,t,o.input.localX,o.input.localY,n),i.cancelled){s=!0;break}if(this.emit(c.GAMEOBJECT_UP,t,o,n),i.cancelled){s=!0;break}}}return s||(t.upElement===this.manager.game.canvas?this.emit(c.POINTER_UP,t,e):this.emit(c.POINTER_UP_OUTSIDE,t)),e.length},queueForInsertion:function(t){return-1===this._pendingInsertion.indexOf(t)&&-1===this._list.indexOf(t)&&this._pendingInsertion.push(t),this},queueForRemoval:function(t){return this._pendingRemoval.push(t),this},setDraggable:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];n.input.draggable=e;var s=this._draggable.indexOf(n);e&&-1===s?this._draggable.push(n):!e&&s>-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return a(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,a=!1;if(g(e)){var h=e;e=f(h,"hitArea",null),i=f(h,"hitAreaCallback",null),n=f(h,"draggable",!1),s=f(h,"dropZone",!1),r=f(h,"cursor",!1),a=f(h,"useHandCursor",!1);var l=f(h,"pixelPerfect",!1),u=f(h,"alphaTolerance",1);l&&(e={},i=this.makePixelPerfect(u)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;c<t.length;c++){var d=t[c],p=d.input?d.input:o(d,e,i);p.dropZone=s,p.cursor=a?"pointer":r,d.input=p,n&&this.setDraggable(d),this.queueForInsertion(d)}return this},setHitAreaCircle:function(t,e,i,r,o){void 0===o&&(o=s);var a=new n(e,i,r);return this.setHitArea(t,a,o)},setHitAreaEllipse:function(t,e,i,n,s,r){void 0===r&&(r=u);var o=new l(e,i,n,s);return this.setHitArea(t,o,r)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=m),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],s=n.frame,r=0,a=0;n.width?(r=n.width,a=n.height):s&&(r=s.realWidth,a=s.realHeight),"Container"!==n.type||0!==r&&0!==a?0!==r&&0!==a&&(n.input=o(n,new y(0,0,r,a),e),this.queueForInsertion(n)):console.warn("Container.setInteractive must specify a Shape or call setSize() first")}return this},setHitAreaRectangle:function(t,e,i,n,s,r){void 0===r&&(r=m);var o=new y(e,i,n,s);return this.setHitArea(t,o,r)},setHitAreaTriangle:function(t,e,i,n,s,r,o,a){void 0===a&&(a=w);var h=new T(e,i,n,s,r,o);return this.setHitArea(t,h,a)},setPollAlways:function(){return this.pollRate=0,this._pollTimer=0,this},setPollOnMove:function(){return this.pollRate=-1,this._pollTimer=0,this},setPollRate:function(t){return this.pollRate=t,this._pollTimer=0,this},setGlobalTopOnly:function(t){return this.manager.globalTopOnly=t,this},setTopOnly:function(t){return this.topOnly=t,this},sortGameObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerGO.bind(this)))},sortHandlerGO:function(t,e){if(!t.parentContainer&&!e.parentContainer)return this.displayList.getIndex(e)-this.displayList.getIndex(t);if(t.parentContainer===e.parentContainer)return e.parentContainer.getIndex(e)-t.parentContainer.getIndex(t);if(t.parentContainer===e)return-1;if(e.parentContainer===t)return 1;for(var i=t.getIndexList(),n=e.getIndexList(),s=Math.min(i.length,n.length),r=0;r<s;r++){var o=i[r],a=n[r];if(o!==a)return a-o}return 0},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},addUpCallback:function(t,e){return this.manager.addUpCallback(t,e),this},addDownCallback:function(t,e){return this.manager.addDownCallback(t,e),this},addMoveCallback:function(t,e){return this.manager.addMoveCallback(t,e),this},addPointer:function(t){return this.manager.addPointer(t)},setDefaultCursor:function(t){return this.manager.setDefaultCursor(t),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(c.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off(x.TRANSITION_START,this.transitionIn,this),e.off(x.TRANSITION_OUT,this.transitionOut,this),e.off(x.TRANSITION_COMPLETE,this.transitionComplete,this),e.off(x.PRE_UPDATE,this.preUpdate,this),this.manager.useQueue&&e.off(x.UPDATE,this.update,this),e.off(x.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.pluginEvents.emit(c.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(x.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});v.register("InputPlugin",b,"input"),t.exports=b},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(625),SNES_USB:i(624),XBOX_360:i(623)}},function(t,e,i){var n=i(0),s=i(11),r=i(153),o=i(262),a=i(4),h=i(114),l=i(52),u=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update)},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var n=t[i];if(n){var s=n.id,r=n.index,a=e[r];if(a)a.id!==s?(a.destroy(),e[r]=new o(this,n)):a.update(n);else{var h=new o(this,n);e[r]=h,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=h):this._pad3=h:this._pad2=h:this._pad1=h}}}else this.disconnectAll()},getAll:function(){for(var t=[],e=this.gamepads,i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},getPad:function(t){for(var e=this.gamepads,i=0;i<e.length;i++)if(e[i]&&e[i].index===t)return e[i]},update:function(){if(this.enabled){this.refreshPads();var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var n=e[i],s=this.getPad(n.gamepad.index);"gamepadconnected"===n.type?this.emit(r.CONNECTED,s,n):"gamepaddisconnected"===n.type&&this.emit(r.DISCONNECTED,s,n)}}},shutdown:function(){this.stopListeners(),this.disconnectAll(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var t=0;t<this.gamepads.length;t++)this.gamepads[t]&&this.gamepads[t].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});h.register("GamepadPlugin",u,"gamepad","gamepad","inputGamepad"),t.exports=u},function(t,e){t.exports="up"},function(t,e){t.exports="down"},function(t,e){t.exports="disconnected"},function(t,e){t.exports="connected"},function(t,e){t.exports="up"},function(t,e){t.exports="down"},function(t,e,i){t.exports={Axis:i(264),Button:i(263),Events:i(153),Gamepad:i(262),GamepadPlugin:i(627),Configs:i(626)}},function(t,e,i){var n=i(341),s=i(19),r={CreateInteractiveObject:i(265),Events:i(52),Gamepad:i(634),InputManager:i(342),InputPlugin:i(622),InputPluginCache:i(114),Keyboard:i(620),Mouse:i(603),Pointer:i(338),Touch:i(602)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(154);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e,i){var n=i(154),s=i(266);t.exports=function(t,e){var i=s(t);return n(t,i.x,i.y,e)}},function(t,e,i){var n=i(58);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),s=t.getLineC();return n(e)+n(i)+n(s)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e,i){var n=i(74);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e,i){var n=i(77);t.exports=function(t,e){void 0===e&&(e=new n);var i,s,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-r,d=h-o,f=l-r,p=u-o,g=c*(r+a)+d*(o+h),v=f*(r+l)+p*(o+u),y=2*(c*(u-h)-d*(l-a));if(Math.abs(y)<1e-6){var m=Math.min(r,a,l),x=Math.min(o,h,u);i=.5*(Math.max(r,a,l)-m),s=.5*(Math.max(o,h,u)-x),e.x=m+i,e.y=x+s,e.radius=Math.sqrt(i*i+s*s)}else e.x=(p*g-d*v)/y,e.y=(c*v-f*g)/y,i=e.x-r,s=e.y-o,e.radius=Math.sqrt(i*i+s*s);return e}},function(t,e,i){var n=i(3);function s(t,e,i,n){return t*n-e*i}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x3,r=t.y3,o=t.x1-i,a=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*s(o,a,h,l),c=s(a,o*o+a*a,l,h*h+l*l),d=s(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},function(t,e,i){var n=i(268),s=i(267);t.exports=function(t,e,i,r){void 0===r&&(r=n);var o=r(t),a=e-o.x,h=i-o.y;return s(t,a,h)}},function(t,e,i){var n=i(65);t.exports=function(t,e,i,s){return void 0===s&&(s=i),new n(t,e,t,e-s,t+i,e)}},function(t,e,i){var n=i(71),s=i(65);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,f,p,g,v=n(t,e),y=0;y<v.length;y+=3)a=v[y],h=v[y+1],l=v[y+2],u=t[2*a]*i,c=t[2*a+1]*r,d=t[2*h]*i,f=t[2*h+1]*r,p=t[2*l]*i,g=t[2*l+1]*r,o.push(new s(u,c,d,f,p,g));return o}},function(t,e,i){var n=i(65);t.exports=function(t,e,i){var s=i*(Math.sqrt(3)/2);return new n(t,e,t+i/2,e+s,t-i/2,e+s)}},function(t,e){t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,s=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(s-i)-(n-e)*(o-i))/2)}},function(t,e,i){var n=i(65);n.Area=i(649),n.BuildEquilateral=i(648),n.BuildFromPolygon=i(647),n.BuildRight=i(646),n.CenterOn=i(645),n.Centroid=i(268),n.CircumCenter=i(644),n.CircumCircle=i(643),n.Clone=i(642),n.Contains=i(74),n.ContainsArray=i(157),n.ContainsPoint=i(641),n.CopyFrom=i(640),n.Decompose=i(274),n.Equals=i(639),n.GetPoint=i(283),n.GetPoints=i(282),n.InCenter=i(266),n.Perimeter=i(638),n.Offset=i(267),n.Random=i(198),n.Rotate=i(637),n.RotateAroundPoint=i(636),n.RotateAroundXY=i(154),t.exports=n},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},function(t,e){t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(184),s=i(269),r=i(6);t.exports=function(t,e,i){if(void 0===i&&(i=new r),s(t,e))switch(n(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},function(t,e,i){var n=i(6),s=i(34);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)<Math.abs(h*o)?h=a*r/o:a=h*o/r,i.x=a+t.centerX,i.y=h+t.centerY,i}},function(t,e){t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e,i){var n=Math.min(t.x,e),s=Math.max(t.right,e);t.x=n,t.width=s-n;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;o<e.length;o++)i=Math.min(i,e[o].x),n=Math.max(n,e[o].x),s=Math.min(s,e[o].y),r=Math.max(r,e[o].y);return t.x=i,t.y=s,t.width=n-i,t.height=r-s,t}},function(t,e,i){var n=i(10),s=i(158);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e,i){var n=i(189);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(6);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(6);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e,i){var n=i(155);t.exports=function(t,e){var i=n(t);return i>n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e,i){var n=i(155);t.exports=function(t,e){var i=n(t);return i<n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(42);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(10);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},function(t,e){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},function(t,e){t.exports=function(t){return t.width*t.height}},function(t,e){t.exports=function(t){return t.points.reverse(),t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i<t.points.length;i++)e.push(t.points[i].x),e.push(t.points[i].y);return e}},function(t,e,i){var n=i(160);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(161);t.exports=function(t){return new n(t.points)}},function(t,e,i){var n=i(161);n.Clone=i(679),n.Contains=i(160),n.ContainsPoint=i(678),n.GetAABB=i(290),n.GetNumberArray=i(677),n.GetPoints=i(289),n.Perimeter=i(288),n.Reverse=i(676),n.Smooth=i(287),t.exports=n},function(t,e,i){var n=i(272);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=n(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},function(t,e,i){var n=i(6);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x*e.x+t.y*e.y;return 0!==s&&(i.x=s*e.x,i.y=s*e.y),i}},function(t,e,i){var n=i(6),s=i(271);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=(t.x*e.x+t.y*e.y)/s(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},function(t,e,i){var n=i(6);t.exports=function(t,e){return void 0===e&&(e=new n),e.setTo(-t.x,-t.y)}},function(t,e){t.exports=function(t){return t.setTo(t.y,t.x)}},function(t,e,i){var n=i(6);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=new n),s.x=t.x+(e.x-t.x)*i,s.y=t.y+(e.y-t.y)*i,s}},function(t,e,i){var n=i(10);t.exports=function(t,e){void 0===e&&(e=new n);for(var i=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;a<t.length;a++){var h=t[a];h.x>i&&(i=h.x),h.x<s&&(s=h.x),h.y>r&&(r=h.y),h.y<o&&(o=h.y)}return e.x=s,e.y=o,e.width=i-s,e.height=r-o,e}},function(t,e,i){var n=i(6);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;s<i;s++)e.x+=t[s].x,e.y+=t[s].y;e.x/=i,e.y/=i}return e}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e,i){var n=i(6);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(6);n.Ceil=i(693),n.Clone=i(692),n.CopyFrom=i(691),n.Equals=i(690),n.Floor=i(689),n.GetCentroid=i(688),n.GetMagnitude=i(272),n.GetMagnitudeSq=i(271),n.GetRectangleFromPoints=i(687),n.Interpolate=i(686),n.Invert=i(685),n.Negative=i(684),n.Project=i(683),n.ProjectUnit=i(682),n.SetMagnitude=i(681),t.exports=n},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e,i){var n=i(156);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e,i){var n=i(156);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(73),s=i(273);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e,i){var n=i(20),s=i(73);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e,i){var n=i(20),s=i(73);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=(s-i)*(s-i)+(r-n)*(r-n);if(0===o)return!1;var a=((n-e.y)*(s-i)-(i-e.x)*(r-n))/o;return Math.abs(a)*Math.sqrt(o)}},function(t,e,i){var n=i(20),s=i(73),r=i(6);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e,i){var n=i(6);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-s)*(o-s)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-s)*(o-s)+(e.y-r)*(a-r))/h;return i.x=s+l*(o-s),i.y=r+l*(a-r),i}},function(t,e,i){var n=i(6);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(58);t.exports=function(t,e,i){void 0===i&&(i=e);var s=n(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/s*e,t.y1=t.y1-o/s*e),i&&(t.x2=t.x2+r/s*i,t.y2=t.y2+o/s*i),t}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e,i){var n=i(59);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(59);n.Angle=i(73),n.BresenhamPoints=i(416),n.CenterOn=i(714),n.Clone=i(713),n.CopyFrom=i(712),n.Equals=i(711),n.Extend=i(710),n.GetMidPoint=i(709),n.GetNearestPoint=i(708),n.GetNormal=i(707),n.GetPoint=i(429),n.GetPoints=i(203),n.GetShortestDistance=i(706),n.Height=i(705),n.Length=i(58),n.NormalAngle=i(273),n.NormalX=i(704),n.NormalY=i(703),n.Offset=i(702),n.PerpSlope=i(701),n.Random=i(202),n.ReflectAngle=i(700),n.Rotate=i(699),n.RotateAroundPoint=i(698),n.RotateAroundXY=i(156),n.SetToAngle=i(697),n.Slope=i(696),n.Width=i(695),t.exports=n},function(t,e,i){var n=i(157),s=i(274),r=i(115);t.exports=function(t,e){if(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)return!1;var i=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=e.getLineA(),l=e.getLineB(),u=e.getLineC();if(r(i,h)||r(i,l)||r(i,u))return!0;if(r(o,h)||r(o,l)||r(o,u))return!0;if(r(a,h)||r(a,l)||r(a,u))return!0;var c=s(t),d=n(e,c,!0);return d.length>0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(74),s=i(115);t.exports=function(t,e){return!!(n(t,e.getPointA())||n(t,e.getPointB())||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},function(t,e,i){var n=i(277),s=i(74);t.exports=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top||!s(t,e.x,e.y)&&!n(t.getLineA(),e)&&!n(t.getLineB(),e)&&!n(t.getLineC(),e))}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||i<t.left-r||n>t.bottom+r||s<t.top-r)}},function(t,e,i){var n=i(115),s=i(42),r=i(157),o=i(275);t.exports=function(t,e){if(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)return!1;var i=e.getLineA(),a=e.getLineB(),h=e.getLineC();if(s(t,i.x1,i.y1)||s(t,i.x2,i.y2))return!0;if(s(t,a.x1,a.y1)||s(t,a.x2,a.y2))return!0;if(s(t,h.x1,h.y1)||s(t,h.x2,h.y2))return!0;var l=t.getLineA(),u=t.getLineB(),c=t.getLineC(),d=t.getLineD();if(n(i,l)||n(i,u)||n(i,c)||n(i,d))return!0;if(n(a,l)||n(a,u)||n(a,c)||n(a,d))return!0;if(n(h,l)||n(h,u)||n(h,c)||n(h,d))return!0;var f=o(t);return r(e,f,!0).length>0}},function(t,e,i){var n=i(276);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i<o&&s>=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n<a&&r>=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(10),s=i(158);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(56);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e,i){var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(95);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e,i){var n=i(95);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(96);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(96);n.Area=i(734),n.Circumference=i(309),n.CircumferencePoint=i(166),n.Clone=i(733),n.Contains=i(95),n.ContainsPoint=i(732),n.ContainsRect=i(731),n.CopyFrom=i(730),n.Equals=i(729),n.GetBounds=i(728),n.GetPoint=i(311),n.GetPoints=i(310),n.Offset=i(727),n.OffsetPoint=i(726),n.Random=i(199),t.exports=n},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e,i){var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(77);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(77);n.Area=i(744),n.Circumference=i(436),n.CircumferencePoint=i(207),n.Clone=i(743),n.Contains=i(43),n.ContainsPoint=i(742),n.ContainsRect=i(741),n.CopyFrom=i(740),n.Equals=i(739),n.GetBounds=i(738),n.GetPoint=i(438),n.GetPoints=i(437),n.Offset=i(737),n.OffsetPoint=i(736),n.Random=i(206),t.exports=n},function(t,e,i){var n=i(0),s=i(280),r=i(17),o=i(16),a=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},function(t,e,i){var n=i(30),s=i(14),r=i(12),o=i(159);s.register("quad",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"key",null),h=r(t,"frame",null),l=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},function(t,e,i){var n=i(30),s=i(14),r=i(12),o=i(4),a=i(116);s.register("mesh",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"colors",[]),u=o(t,"alphas",[]),c=o(t,"uv",[]),d=new a(this.scene,0,0,h,c,l,u,i,s);return void 0!==e&&(t.add=e),n(this.scene,d,t),d})},function(t,e,i){var n=i(159);i(5).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(116);i(5).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=c.length,v=Math.floor(.5*g);o.vertexCount+v>o.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var y=o.vertexViewF32,m=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b<g;b+=2){var S=c[b+0],_=c[b+1],A=S*l.a+_*l.c+l.e,E=S*l.b+_*l.d+l.f;s.roundPixels&&(A=Math.round(A),E=Math.round(E)),y[++x]=A,y[++x]=E,y[++x]=d[b+0],y[++x]=d[b+1],y[++x]=w,m[++x]=n.getTintAppendFloatAlpha(f[T],s.alpha*p[T]),T++}o.vertexCount+=v}},function(t,e,i){var n=i(1),s=i(1);n=i(752),s=i(751),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(14),s=i(12),r=i(137);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(30),s=i(14),r=i(12),o=i(162);s.register("tileSprite",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new o(this.scene,i,s,a,h,l,u);return void 0!==e&&(t.add=e),n(this.scene,c,t),c})},function(t,e,i){var n=i(30),s=i(14),r=i(12),o=i(163);s.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},function(t,e,i){var n=i(117),s=i(30),r=i(14),o=i(12),a=i(4);r.register("bitmapText",function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new n(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u})},function(t,e,i){var n=i(30),s=i(315),r=i(14),o=i(12),a=i(67);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h})},function(t,e,i){var n=i(30),s=i(14),r=i(12),o=i(164);s.register("renderTexture",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},function(t,e,i){var n=i(14),s=i(12),r=i(2),o=i(165);n.register("particles",function(t,e){void 0===t&&(t={});var i=s(t,"key",null),n=s(t,"frame",null),a=r(t,"emitters",null),h=new o(this.scene,i,n,a);return void 0!==e&&(t.add=e),r(t,"add",!1)&&this.displayList.add(h),this.updateList.add(h),h})},function(t,e,i){var n=i(30),s=i(14),r=i(12),o=i(93);s.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},function(t,e,i){var n=i(14),s=i(94);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(14),s=i(168);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(169),s=i(30),r=i(14),o=i(12);r.register("dynamicBitmapText",function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new n(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h})},function(t,e,i){var n=i(30),s=i(170),r=i(14),o=i(12);r.register("container",function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),a=new s(this.scene,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},function(t,e,i){var n=i(171),s=i(30),r=i(14),o=i(12);r.register("blitter",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new n(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,a,t),a})},function(t,e,i){var n=i(5),s=i(284);n.register("triangle",function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))})},function(t,e,i){var n=i(285);i(5).register("star",function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))})},function(t,e,i){var n=i(5),s=i(286);n.register("rectangle",function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))})},function(t,e,i){var n=i(5),s=i(291);n.register("polygon",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var n=i(5),s=i(292);n.register("line",function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})},function(t,e,i){var n=i(5),s=i(293);n.register("isotriangle",function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})},function(t,e,i){var n=i(5),s=i(294);n.register("isobox",function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))})},function(t,e,i){var n=i(5),s=i(295);n.register("grid",function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))})},function(t,e,i){var n=i(296);i(5).register("ellipse",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(5),s=i(297);n.register("curve",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var n=i(298),s=i(5);s.register("arc",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}),s.register("circle",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,0,360,!1,s,r))})},function(t,e,i){var n=i(137);i(5).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(162);i(5).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(163);i(5).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(117);i(5).register("bitmapText",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(5),s=i(67);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(5),s=i(164);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(5),s=i(300);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(5),s=i(165);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(93);i(5).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(94);i(5).register("group",function(t,e){return this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(168);i(5).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(312);i(5).register("extern",function(){var t=new n(this.scene);return this.displayList.add(t),this.updateList.add(t),t})},function(t,e,i){var n=i(169);i(5).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(170);i(5).register("container",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var n=i(171);i(5).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.geom.x1-l,d=e.geom.y1-u,f=e.geom.x2-l,p=e.geom.y2-u,g=e.geom.x3-l,v=e.geom.y3-u;h.beginPath(),h.moveTo(c,d),h.lineTo(f,p),h.lineTo(g,v),h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){var n=i(66),s=i(9);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;if(e.isFilled){var p=a.fillTint,g=s.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*f);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var v=e.geom.x1-c,y=e.geom.y1-d,m=e.geom.x2-c,x=e.geom.y2-d,T=e.geom.x3-c,w=e.geom.y3-d;a.setTexture2D(),a.batchFillTriangle(v,y,m,x,T,w,l,h)}e.isStroked&&n(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(794),s=i(793),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g<d;g+=2){var v=c[g]-l,y=c[g+1]-u;h.lineTo(v,y)}h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){var n=i(88),s=i(66);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(797),s=i(796),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY;e.isFilled&&(n(h,e),h.fillRect(-l,-u,e.width,e.height)),e.isStroked&&(s(h,e),h.beginPath(),h.rect(-l,-u,e.width,e.height),h.stroke()),h.restore()}}},function(t,e,i){var n=i(66),s=i(9);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;if(e.isFilled){var p=a.fillTint,g=s.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*f);p.TL=g,p.TR=g,p.BL=g,p.BR=g,a.setTexture2D(),a.batchFillRect(-c,-d,e.width,e.height)}e.isStroked&&n(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(800),s=i(799),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g<d;g+=2){var v=c[g]-l,y=c[g+1]-u;h.lineTo(v,y)}h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){var n=i(88),s=i(66);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(803),s=i(802),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(39),s=i(25);t.exports=function(t,e,i,r,o){var a=t.currentContext;if(s(t,a,e,r,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isStroked&&(n(a,e),a.beginPath(),a.moveTo(e.geom.x1-h,e.geom.y1-l),a.lineTo(e.geom.x2-h,e.geom.y2-l),a.stroke()),a.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY);var l=e._displayOriginX,u=e._displayOriginY,c=s.alpha*e.alpha;if(e.isStroked){var d=o.strokeTint,f=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f;var p=e._startWidth,g=e._endWidth;o.setTexture2D(),o.batchLine(e.geom.x1-l,e.geom.y1-u,e.geom.x2-l,e.geom.y2-u,p,g,1,0,!1,h,a)}}},function(t,e,i){var n=i(1),s=i(1);n=i(806),s=i(805),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(25);t.exports=function(t,e,i,r,o){var a=t.currentContext;if(s(t,a,e,r,o)&&e.isFilled){var h=e.width,l=e.height,u=h/2,c=h/e.projection,d=e.isReversed;e.showTop&&d&&(n(a,e,e.fillTop),a.beginPath(),a.moveTo(-u,-l),a.lineTo(0,-c-l),a.lineTo(u,-l),a.lineTo(0,c-l),a.fill()),e.showLeft&&(n(a,e,e.fillLeft),a.beginPath(),d?(a.moveTo(-u,-l),a.lineTo(0,c),a.lineTo(0,c-l)):(a.moveTo(-u,0),a.lineTo(0,c),a.lineTo(0,c-l)),a.fill()),e.showRight&&(n(a,e,e.fillRight),a.beginPath(),d?(a.moveTo(u,-l),a.lineTo(0,c),a.lineTo(0,c-l)):(a.moveTo(u,0),a.lineTo(0,c),a.lineTo(0,c-l)),a.fill()),a.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY),a.multiply(h,l);var u=e.width,c=e.height,d=u/2,f=u/e.projection,p=e.isReversed,g=s.alpha*e.alpha;if(e.isFilled){var v,y,m,x,T,w,b;if(e.showTop&&p){v=n.getTintAppendFloatAlphaAndSwap(e.fillTop,g),y=l.getX(-d,-c),m=l.getY(-d,-c),x=l.getX(0,-f-c),T=l.getY(0,-f-c),w=l.getX(d,-c),b=l.getY(d,-c);var S=l.getX(0,f-c),_=l.getY(0,f-c);o.setTexture2D(),o.batchQuad(y,m,x,T,w,b,S,_,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlphaAndSwap(e.fillLeft,g),p?(y=l.getX(-d,-c),m=l.getY(-d,-c),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)):(y=l.getX(-d,0),m=l.getY(-d,0),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)),o.batchTri(y,m,x,T,w,b,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlphaAndSwap(e.fillRight,g),p?(y=l.getX(d,-c),m=l.getY(d,-c),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)):(y=l.getX(d,0),m=l.getY(d,0),x=l.getX(0,f),T=l.getY(0,f),w=l.getX(0,f-c),b=l.getY(0,f-c)),o.setTexture2D(),o.batchTri(y,m,x,T,w,b,0,0,1,1,v,v,v,2))}}},function(t,e,i){var n=i(1),s=i(1);n=i(809),s=i(808),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(25);t.exports=function(t,e,i,r,o){var a=t.currentContext;if(s(t,a,e,r,o)&&e.isFilled){var h=e.width,l=e.height,u=h/2,c=h/e.projection;e.showTop&&(n(a,e,e.fillTop),a.beginPath(),a.moveTo(-u,-l),a.lineTo(0,-c-l),a.lineTo(u,-l),a.lineTo(u,-1),a.lineTo(0,c-1),a.lineTo(-u,-1),a.lineTo(-u,-l),a.fill()),e.showLeft&&(n(a,e,e.fillLeft),a.beginPath(),a.moveTo(-u,0),a.lineTo(0,c),a.lineTo(0,c-l),a.lineTo(-u,-l),a.lineTo(-u,0),a.fill()),e.showRight&&(n(a,e,e.fillRight),a.beginPath(),a.moveTo(u,0),a.lineTo(0,c),a.lineTo(0,c-l),a.lineTo(u,-l),a.lineTo(u,0),a.fill()),a.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY),a.multiply(h,l);var u,c,d,f,p,g,v,y,m,x=e.width,T=e.height,w=x/2,b=x/e.projection,S=s.alpha*e.alpha;e.isFilled&&(e.showTop&&(u=n.getTintAppendFloatAlphaAndSwap(e.fillTop,S),c=l.getX(-w,-T),d=l.getY(-w,-T),f=l.getX(0,-b-T),p=l.getY(0,-b-T),g=l.getX(w,-T),v=l.getY(w,-T),y=l.getX(0,b-T),m=l.getY(0,b-T),o.setTexture2D(),o.batchQuad(c,d,f,p,g,v,y,m,0,0,1,1,u,u,u,u,2)),e.showLeft&&(u=n.getTintAppendFloatAlphaAndSwap(e.fillLeft,S),c=l.getX(-w,0),d=l.getY(-w,0),f=l.getX(0,b),p=l.getY(0,b),g=l.getX(0,b-T),v=l.getY(0,b-T),y=l.getX(-w,-T),m=l.getY(-w,-T),o.setTexture2D(),o.batchQuad(c,d,f,p,g,v,y,m,0,0,1,1,u,u,u,u,2)),e.showRight&&(u=n.getTintAppendFloatAlphaAndSwap(e.fillRight,S),c=l.getX(w,0),d=l.getY(w,0),f=l.getX(0,b),p=l.getY(0,b),g=l.getX(0,b-T),v=l.getY(0,b-T),y=l.getX(w,-T),m=l.getY(w,-T),o.setTexture2D(),o.batchQuad(c,d,f,p,g,v,y,m,0,0,1,1,u,u,u,u,2)))}},function(t,e,i){var n=i(1),s=i(1);n=i(812),s=i(811),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY;e.isFilled&&(n(h,e),h.fillRect(-l,-u,e.width,e.height)),e.isStroked&&(s(h,e),h.beginPath(),h.rect(-l,-u,e.width,e.height),h.stroke()),h.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;t.setPipeline(o),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY),a.multiply(h,l),l.translate(-e._displayOriginX,-e._displayOriginY);var u,c,d=s.alpha*e.alpha,f=e.width,p=e.height,g=e.cellWidth,v=e.cellHeight,y=Math.ceil(f/g),m=Math.ceil(p/v),x=g,T=v,w=g-(y*g-f),b=v-(m*v-p),S=e.showCells,_=e.showAltCells,A=e.showOutline,E=0,C=0,M=0,P=0,O=0;if(A&&(x--,T--,w===g&&w--,b===v&&b--),S&&e.fillAlpha>0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C<m;C++)for(_&&(M=C%2),E=0;E<y;E++)_&&M?M=0:(M++,P=E<y-1?x:w,O=C<m-1?T:b,o.setTexture2D(),o.batchFillRect(E*g,C*v,P,O));if(_&&e.altFillAlpha>0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C<m;C++)for(_&&(M=C%2),E=0;E<y;E++)!_||M?(M=0,P=E<y-1?x:w,O=C<m-1?T:b,o.setTexture2D(),o.batchFillRect(E*g,C*v,P,O)):M=1;if(A&&e.outlineFillAlpha>0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,E=1;E<y;E++){var D=E*g;o.setTexture2D(),o.batchLine(D,0,D,p,1,1,1,0,!1)}for(C=1;C<m;C++){var F=C*v;o.setTexture2D(),o.batchLine(0,F,f,F,1,1,1,0,!1)}}}},function(t,e,i){var n=i(1),s=i(1);n=i(815),s=i(814),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX,u=e._displayOriginY,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g<d;g+=2){var v=c[g]-l,y=c[g+1]-u;h.lineTo(v,y)}h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){var n=i(88),s=i(66);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(818),s=i(817),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(33),s=i(39),r=i(25);t.exports=function(t,e,i,o,a){var h=t.currentContext;if(r(t,h,e,o,a)){var l=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,c=e.pathData,d=c.length-1,f=c[0]-l,p=c[1]-u;h.beginPath(),h.moveTo(f,p),e.closePath||(d-=2);for(var g=2;g<d;g+=2){var v=c[g]-l,y=c[g+1]-u;h.lineTo(v,y)}e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){var n=i(88),s=i(66);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX+e._curveBounds.x,d=e._displayOriginY+e._curveBounds.y,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(821),s=i(820),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(34),s=i(33),r=i(39),o=i(25);t.exports=function(t,e,i,a,h){var l=t.currentContext;if(o(t,l,e,a,h)){var u=e.radius;l.beginPath(),l.arc(u-e.originX*(2*u),u-e.originY*(2*u),u,n(e._startAngle),n(e._endAngle),e.anticlockwise),e.closePath&&l.closePath(),e.isFilled&&(s(l,e),l.fill()),e.isStroked&&(r(l,e),l.stroke()),l.restore()}}},function(t,e,i){var n=i(88),s=i(66);t.exports=function(t,e,i,r,o){var a=this.pipeline,h=a._tempMatrix1,l=a._tempMatrix2,u=a._tempMatrix3;t.setPipeline(a),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),h.copyFrom(r.matrix),o?(h.multiplyWithOffset(o,-r.scrollX*e.scrollFactorX,-r.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=r.scrollX*e.scrollFactorX,l.f-=r.scrollY*e.scrollFactorY),h.multiply(l,u);var c=e._displayOriginX,d=e._displayOriginY,f=r.alpha*e.alpha;e.isFilled&&n(a,u,e,f,c,d),e.isStroked&&s(a,e,f,c,d)}},function(t,e,i){var n=i(1),s=i(1);n=i(824),s=i(823),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){e.updateCanvas(),t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){e.updateCanvas();var o=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*e.width,e.originY*e.height,0,0,e.width,e.height,o(e._tintTL,s.alpha*e._alphaTL),o(e._tintTR,s.alpha*e._alphaTR),o(e._tintBL,s.alpha*e._alphaBL),o(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,s,r)}},function(t,e,i){var n=i(1),s=i(1);n=i(827),s=i(826),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(24);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;h<r;h++){for(l=0;l<d;l+=4)if(255!==u[f+l]){p=!0;break}if(p)break;f+=d}for(a.ascent=r-h,f=c-d,p=!1,h=o;h>r;h--){for(l=0;l<d;l+=4)if(255!==u[f+l]){p=!0;break}if(p)break;f-=d}return a.descent=h-r,a.fontSize=a.ascent+a.descent,n.remove(e),a}},function(t,e,i){var n=i(0),s=i(12),r=i(4),o=i(829),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÃ‰qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s){""!==e.text&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){if(""!==e.text){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e,i){var n=i(1),s=i(1);n=i(832),s=i(831),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines<i.length&&(h=r.maxLines),r.syncFont(n,s);for(var l=0;l<h;l++){var u=r.strokeThickness;u+=s.measureText(i[l]).width,r.wordWrap&&(u-=s.measureText(" ").width),o[l]=Math.ceil(u),a=Math.max(a,o[l])}var c=e.fontSize+r.strokeThickness,d=c*h,f=t.lineSpacing;return i.length>1&&(d+=f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(4);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,y={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},m=0,x=0;x<a.length;x++){var T=a.charCodeAt(x);y.chars[T]={x:g,y:v,width:i,height:s,centerX:r,centerY:o,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{}},++m===p?(m=0,g=l,v+=s+d):g+=i+c}return{data:y,frame:null,texture:h}}}},function(t,e){t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(836),s=i(19),r={Parse:i(835)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r),t.setBlankTexture(!0)}},function(t,e,i){var n=i(1),s=i(1);n=i(839),s=i(838),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(304),EdgeZone:i(303),RandomZone:i(301)}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.emitters.list,o=r.length;if(0!==o){var a=t._tempMatrix1.copyFrom(n.matrix),h=t._tempMatrix2,l=t._tempMatrix3,u=t._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);a.multiply(u);var c=n.roundPixels,d=t.currentContext;d.save();for(var f=0;f<o;f++){var p=r[f],g=p.alive,v=g.length;if(p.visible&&0!==v){var y=n.scrollX*p.scrollFactorX,m=n.scrollY*p.scrollFactorY;s&&(a.multiplyWithOffset(s,-y,-m),y=0,m=0),d.globalCompositeOperation=t.blendModes[p.blendMode];for(var x=0;x<v;x++){var T=g[x],w=T.alpha*n.alpha;if(!(w<=0)){var b=T.frame,S=b.canvasData,_=-b.halfWidth,A=-b.halfHeight;l.applyITRS(0,0,T.rotation,T.scaleX,T.scaleY),l.e=T.x-y,l.f=T.y-m,a.multiply(l,h),d.globalAlpha=w,d.save(),h.copyToContext(d),c&&(_=Math.round(_),A=Math.round(A)),d.drawImage(b.source.image,S.x,S.y,S.width,S.height,_,A,S.width,S.height),d.restore()}}}}d.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v<a;v++){var y=o[v],m=y.alive,x=m.length;if(y.visible&&0!==x){var T=s.scrollX*y.scrollFactorX,w=s.scrollY*y.scrollFactorY;r&&(l.multiplyWithOffset(r,-T,-w),T=0,w=0),t.setBlendMode(y.blendMode)&&h.setTexture2D(p,0);for(var b=0;b<x;b++){var S=m[b],_=S.alpha*s.alpha;if(!(_<=0)){var A=S.frame,E=-A.halfWidth,C=-A.halfHeight,M=E+A.width,P=C+A.height;c.applyITRS(0,0,S.rotation,S.scaleX,S.scaleY),c.e=S.x-T,c.f=S.y-w,l.multiply(c,u);var O=u.getX(E,C),R=u.getY(E,C),L=u.getX(E,P),D=u.getY(E,P),F=u.getX(M,P),k=u.getY(M,P),I=u.getX(M,C),B=u.getY(M,C);f&&(O=Math.round(O),R=Math.round(R),L=Math.round(L),D=Math.round(D),F=Math.round(F),k=Math.round(k),I=Math.round(I),B=Math.round(B));var Y=g(S.tint,_);h.batchQuad(O,R,L,D,F,k,I,B,A.u0,A.v0,A.u1,A.v1,Y,Y,Y,Y,0,p,0)}}}}}}},function(t,e,i){var n=i(1),s=i(1);n=i(843),s=i(842),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(0),s=i(374),r=i(92),o=i(2),a=i(57),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){t.exports={GravityWell:i(307),Particle:i(306),ParticleEmitter:i(305),ParticleEmitterManager:i(165),Zones:i(841)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(848),s=i(847),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(851),s=i(850),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(167),s=i(9),r=function(t,e,i){this.x=t,this.y=e,this.width=i},o=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new r(t,e,i)},a=[];t.exports=function(t,e,i,h,l){if(0!==e.commandBuffer.length){var u=t.currentPipeline,c=u._tempMatrix1,d=u._tempMatrix2,f=u._tempMatrix4;t.setPipeline(u),f.loadIdentity(),d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),c.copyFrom(h.matrix),l?(c.multiplyWithOffset(l,-h.scrollX*e.scrollFactorX,-h.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d)):(d.e-=h.scrollX*e.scrollFactorX,d.f-=h.scrollY*e.scrollFactorY,c.multiply(d));for(var p=e.commandBuffer,g=h.alpha*e.alpha,v=1,y=u.fillTint,m=u.strokeTint,x=0,T=0,w=0,b=2*Math.PI,S=[],_=0,A=!1,E=null,C=s.getTintAppendFloatAlphaAndSwap,M=t.blankTexture.glTexture,P=0;P<p.length;P++)switch(p[P]){case n.BEGIN_PATH:S.length=0,E=null,A=!0;break;case n.CLOSE_PATH:A=!1,E&&E.points.length&&E.points.push(E.points[0]);break;case n.FILL_PATH:for(_=0;_<S.length;_++)u.setTexture2D(M),u.batchFillPath(S[_].points,f,c);break;case n.STROKE_PATH:for(_=0;_<S.length;_++)u.setTexture2D(M),u.batchStrokePath(S[_].points,v,A,f,c);break;case n.LINE_STYLE:v=p[++P];var O=C(p[++P],p[++P]*g);m.TL=O,m.TR=O,m.BL=O,m.BR=O;break;case n.FILL_STYLE:var R=C(p[++P],p[++P]*g);y.TL=R,y.TR=R,y.BL=R,y.BR=R;break;case n.GRADIENT_FILL_STYLE:var L=p[++P]*g;y.TL=C(p[++P],L),y.TR=C(p[++P],L),y.BL=C(p[++P],L),y.BR=C(p[++P],L);break;case n.GRADIENT_LINE_STYLE:v=p[++P];var D=p[++P]*g;m.TL=C(p[++P],D),m.TR=C(p[++P],D),m.BL=C(p[++P],D),m.BR=C(p[++P],D);break;case n.ARC:var F=0,k=p[++P],I=p[++P],B=p[++P],Y=p[++P],N=p[++P],X=p[++P],z=p[++P];for(N-=Y,X?N<-b?N=-b:N>0&&(N=N%b-b):N>b?N=b:N<0&&(N=b+N%b),null===E&&(E=new o(k+Math.cos(Y)*B,I+Math.sin(Y)*B,v),S.push(E),F+=.01);F<1+z;)w=N*F+Y,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,E.points.push(new r(x,T,v)),F+=.01;w=N+Y,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,E.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++P],p[++P],p[++P],p[++P],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],v,f,c);break;case n.LINE_TO:null!==E?E.points.push(new r(p[++P],p[++P],v)):(E=new o(p[++P],p[++P],v),S.push(E));break;case n.MOVE_TO:E=new o(p[++P],p[++P],v),S.push(E);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:k=p[++P],I=p[++P],f.translate(k,I);break;case n.SCALE:k=p[++P],I=p[++P],f.scale(k,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var U=p[++P],G=p[++P];u.currentFrame=U,u.setTexture2D(U.glTexture,0),u.tintEffect=G,M=U.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(1),s=i(1);n=i(853),s=i(308),s=i(308),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){},function(t,e){t.exports=function(t,e,i,n,s){var r=t.currentPipeline;t.clearPipeline();var o=t._tempMatrix1,a=t._tempMatrix2,h=t._tempMatrix3;a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),o.copyFrom(n.matrix),s?(o.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),a.e=e.x,a.f=e.y,o.multiply(a,h)):(a.e-=n.scrollX*e.scrollFactorX,a.f-=n.scrollY*e.scrollFactorY,o.multiply(a,h)),e.render.call(e,t,n,h),t.rebindPipeline(r)}},function(t,e,i){var n=i(1),s=i(1);n=i(856),s=i(855),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(25);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length,h=t.currentContext;if(0!==a&&n(t,h,e,s,r)){var l=e.frame,u=e.displayCallback,c=e.callbackData,d=s.scrollX*e.scrollFactorX,f=s.scrollY*e.scrollFactorY,p=e.fontData.chars,g=e.fontData.lineHeight,v=0,y=0,m=0,x=0,T=null,w=0,b=0,S=0,_=0,A=0,E=0,C=null,M=0,P=e.frame.source.image,O=l.cutX,R=l.cutY,L=0,D=e.fontSize/e.fontData.size;e.cropWidth>0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var F=0;F<a;++F)if(D=e.fontSize/e.fontData.size,L=0,10!==(x=o.charCodeAt(F))){if(T=p[x]){if(w=O+T.x,b=R+T.y,S=T.width,_=T.height,A=m+T.xOffset+v-e.scrollX,E=T.yOffset+y-e.scrollY,null!==C){var k=T.kerning[M];A+=void 0!==k?k:0}if(u){c.index=F,c.charCode=x,c.x=A,c.y=E,c.scale=D,c.rotation=L,c.data=T.data;var I=u(c);A=I.x,E=I.y,D=I.scale,L=I.rotation}A*=D,E*=D,A-=d,E-=f,s.roundPixels&&(A=Math.round(A),E=Math.round(E)),h.save(),h.translate(A,E),h.rotate(L),h.scale(D,D),h.drawImage(P,w,b,S,_,0,0,S,_),h.restore(),v+=T.xAdvance,m+=1,C=T,M=x}}else v=0,m=0,y+=g,C=null;h.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var l=e.cropWidth>0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,y=p.cutY,m=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),S=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),_=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,E,C=0,M=0,P=0,O=0,R=e.letterSpacing,L=0,D=0,F=0,k=0,I=e.scrollX,B=e.scrollY,Y=e.fontData,N=Y.chars,X=Y.lineHeight,z=e.fontSize/Y.size,U=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J<a;J++)if(10!==(P=o.charCodeAt(J))){if(A=N[P]){L=v+A.x,D=y+A.y,F=A.width,k=A.height;var Z=A.xOffset+C-I,Q=A.yOffset+M-B;if(null!==E){var $=A.kerning[O];Z+=void 0!==$?$:0}if(C+=A.xAdvance+R,E=A,O=P,0!==F&&0!==k&&32!==P){if(z=e.fontSize/e.fontData.size,U=0,q){K.color=0,K.tint.topLeft=w,K.tint.topRight=b,K.tint.bottomLeft=S,K.tint.bottomRight=_,K.index=J,K.charCode=P,K.x=Z,K.y=Q,K.scale=z,K.rotation=U,K.data=A.data;var tt=q(K);Z=tt.x,Q=tt.y,z=tt.scale,U=tt.rotation,tt.color?(w=tt.color,b=tt.color,S=tt.color,_=tt.color):(w=tt.tint.topLeft,b=tt.tint.topRight,S=tt.tint.bottomLeft,_=tt.tint.bottomRight),w=n.getTintAppendFloatAlpha(w,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(b,s.alpha*e._alphaTR),S=n.getTintAppendFloatAlpha(S,s.alpha*e._alphaBL),_=n.getTintAppendFloatAlpha(_,s.alpha*e._alphaBR)}Z*=z,Q*=z,Z-=e.displayOriginX,Q-=e.displayOriginY,Z+=V,f.applyITRS(Z,Q,U,z,z),d.multiply(f,c);var et=L/m,it=D/x,nt=(L+F)/m,st=(D+k)/x,rt=F,ot=k,at=c.e,ht=c.f,lt=ot*c.c+c.e,ut=ot*c.d+c.f,ct=rt*c.a+ot*c.c+c.e,dt=rt*c.b+ot*c.d+c.f,ft=rt*c.a+c.e,pt=rt*c.b+c.f;j&&(at=Math.round(at),ht=Math.round(ht),lt=Math.round(lt),ut=Math.round(ut),ct=Math.round(ct),dt=Math.round(dt),ft=Math.round(ft),pt=Math.round(pt)),h.batchQuad(at,ht,lt,ut,ct,dt,ft,pt,et,it,nt,st,w,b,S,_,T,g,0)}}}else W++,1===G?V=(H.longest-H.lengths[W])/2:2===G&&(V=H.longest-H.lengths[W]),C=0,M+=X,E=null;l&&(h.flush(),t.popScissor())}}},function(t,e,i){var n=i(1),s=i(1);n=i(859),s=i(858),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c<r.length;c++){var d=r[c];if(d.willRender(n)){var f=d._alpha,p=d._blendMode,g=d.scrollFactorX,v=d.scrollFactorY;d.setScrollFactor(g*l,v*u),d.setAlpha(f*h),a&&d.setBlendMode(e._blendMode),d.renderCanvas(t,d,i,n,o),d.setAlpha(f),d.setScrollFactor(g,v),d.setBlendMode(p)}}}}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c<r.length;c++){var d=r[c];if(d.willRender(n)){var f=d._alpha,p=d.scrollFactorX,g=d.scrollFactorY;a||d.blendMode===t.currentBlendMode||t.setBlendMode(d.blendMode),d.setScrollFactor(p*l,g*u),d.setAlpha(f*h),d.renderWebGL(t,d,i,n,o),d.setAlpha(f),d.setScrollFactor(p,g)}}}}},function(t,e,i){var n=i(1),s=i(1);n=i(862),s=i(861),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return this.frame=void 0===t?this.parent.frame:this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.parent.dirty=!0}},alpha:{get:function(){return this._alpha},set:function(t){this._alpha=t,this.parent.dirty=!0}}});t.exports=n},function(t,e){t.exports=function(t,e,i,n,s){var r=e.getRenderList();if(0!==r.length){var o=t.currentContext,a=n.alpha*e.alpha;if(0!==a){o.globalCompositeOperation=t.blendModes[e.blendMode];var h=e.x-n.scrollX*e.scrollFactorX,l=e.y-n.scrollY*e.scrollFactorY;o.save(),s&&s.copyToContext(o);for(var u=n.roundPixels,c=0;c<r.length;c++){var d=r[c],f=d.flipX||d.flipY,p=d.frame,g=p.canvasData,v=p.x,y=p.y,m=1,x=1,T=d.alpha*a;0!==T&&(o.globalAlpha=T,f?(d.flipX&&(m=-1,v-=g.width),d.flipY&&(x=-1,y-=g.height),o.save(),o.translate(d.x+h,d.y+l),o.scale(m,x),o.drawImage(p.source.image,g.x,g.y,g.width,g.height,v,y,g.width,g.height),o.restore()):(u&&(v=Math.round(v),y=Math.round(y)),o.drawImage(p.source.image,g.x,g.y,g.width,g.height,v+d.x+h,y+d.y+l,g.width,g.height)))}o.restore()}}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=e.getRenderList();if(0!==o.length){var a=this.pipeline;t.setPipeline(a,e);var h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=a._tempMatrix1;u.copyFrom(s.matrix),r&&(u.multiplyWithOffset(r,-h,-l),h=0,l=0);for(var c=e.x-h,d=e.y-l,f=-1,p=s.alpha*e.alpha,g=s.roundPixels,v=0;v<o.length;v++){var y=o[v],m=y.frame,x=y.alpha*p;if(0!==x){var T=m.width,w=m.height,b=c+y.x+m.x,S=d+y.y+m.y;y.flipX&&(T*=-1,b+=m.width),y.flipY&&(w*=-1,S+=m.height);var _=b+T,A=S+w,E=u.getX(b,S),C=u.getY(b,S),M=u.getX(_,A),P=u.getY(_,A),O=n.getTintAppendFloatAlpha(16777215,x);m.sourceIndex!==f&&(a.setTexture2D(m.glTexture,0),f=m.sourceIndex),g&&(E=Math.round(E),C=Math.round(C),M=Math.round(M),P=Math.round(P)),a.batchQuad(E,C,E,P,M,P,M,C,m.u0,m.v0,m.u1,m.v1,O,O,O,O,!1,m.glTexture,0)&&(f=-1)}}}}},function(t,e,i){var n=i(1),s=i(1);n=i(866),s=i(865),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(25);t.exports=function(t,e,i,s,r){var o=e._text,a=o.length,h=t.currentContext;if(0!==a&&n(t,h,e,s,r)){var l=e.frame,u=e.fontData.chars,c=e.fontData.lineHeight,d=e._letterSpacing,f=0,p=0,g=0,v=null,y=0,m=0,x=0,T=0,w=0,b=0,S=null,_=0,A=e.frame.source.image,E=l.cutX,C=l.cutY,M=e._fontSize/e.fontData.size,P=e._align,O=0,R=0;e.getTextBounds(!1);var L=e._bounds.lines;1===P?R=(L.longest-L.lengths[0])/2:2===P&&(R=L.longest-L.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var D=s.roundPixels,F=0;F<a;F++)if(10!==(g=o.charCodeAt(F))){if(v=u[g]){if(y=E+v.x,m=C+v.y,x=v.width,T=v.height,w=v.xOffset+f,b=v.yOffset+p,null!==S){var k=v.kerning[_];w+=void 0!==k?k:0}w*=M,b*=M,w+=R,f+=v.xAdvance+d,S=v,_=g,0!==x&&0!==T&&32!==g&&(D&&(w=Math.round(w),b=Math.round(b)),h.save(),h.translate(w,b),h.scale(M,M),h.drawImage(A,y,m,x,T,0,0,x,T),h.restore())}}else O++,1===P?R=(L.longest-L.lengths[O])/2:2===P&&(R=L.longest-L.lengths[O]),f=0,p+=c,S=null;h.restore()}}},function(t,e,i){var n=i(9);t.exports=function(t,e,i,s,r){var o=e._text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var l=h._tempMatrix1,u=h._tempMatrix2,c=h._tempMatrix3;u.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),l.copyFrom(s.matrix),r?(l.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),u.e=e.x,u.f=e.y,l.multiply(u,c)):(u.e-=s.scrollX*e.scrollFactorX,u.f-=s.scrollY*e.scrollFactorY,l.multiply(u,c));var d=e.frame,f=d.glTexture,p=d.cutX,g=d.cutY,v=f.width,y=f.height,m=e._isTinted&&e.tintFill,x=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),w=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),b=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(f,0);var S,_,A=0,E=0,C=0,M=0,P=e._letterSpacing,O=0,R=0,L=0,D=0,F=e.fontData,k=F.chars,I=F.lineHeight,B=e._fontSize/F.size,Y=e._align,N=0,X=0;e.getTextBounds(!1);var z=e._bounds.lines;1===Y?X=(z.longest-z.lengths[0])/2:2===Y&&(X=z.longest-z.lengths[0]);for(var U=s.roundPixels,G=0;G<a;G++)if(10!==(C=o.charCodeAt(G))){if(S=k[C]){O=p+S.x,R=g+S.y,L=S.width,D=S.height;var W=S.xOffset+A,V=S.yOffset+E;if(null!==_){var H=S.kerning[M];W+=void 0!==H?H:0}if(A+=S.xAdvance+P,_=S,M=C,0!==L&&0!==D&&32!==C){W*=B,V*=B,W-=e.displayOriginX,V-=e.displayOriginY;var j=O/v,q=R/y,K=(O+L)/v,J=(R+D)/y,Z=(W+=X)+L*B,Q=V+D*B,$=c.getX(W,V),tt=c.getY(W,V),et=c.getX(W,Q),it=c.getY(W,Q),nt=c.getX(Z,Q),st=c.getY(Z,Q),rt=c.getX(Z,V),ot=c.getY(Z,V);U&&($=Math.round($),tt=Math.round(tt),et=Math.round(et),it=Math.round(it),nt=Math.round(nt),st=Math.round(st),rt=Math.round(rt),ot=Math.round(ot)),h.batchQuad($,tt,et,it,nt,st,rt,ot,j,q,K,J,x,T,w,b,m,f,0)}}}else N++,1===Y?X=(z.longest-z.lengths[N])/2:2===Y&&(X=z.longest-z.lengths[N]),A=0,E+=I,_=null}}},function(t,e,i){var n=i(1),s=i(1);n=i(869),s=i(868),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(314);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.getFrame(i,s),l=t.sys.cache.xml.get(r);if(h&&l){var u=n(l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:u,texture:i,frame:s}),!0}return!1}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null}});for(var n=t.text,s=n.length,r=Number.MAX_VALUE,o=Number.MAX_VALUE,a=0,h=0,l=t.fontData.chars,u=t.fontData.lineHeight,c=t.letterSpacing,d=0,f=0,p=0,g=null,v=0,y=0,m=t.fontSize/t.fontData.size,x=m*t.scaleX,T=m*t.scaleY,w=null,b=0,S=[],_=Number.MAX_VALUE,A=0,E=0,C=0,M=0;M<s;M++)if(10!==(p=n.charCodeAt(M))){if(g=l[p]){if(v=d,y=f,null!==w){var P=g.kerning[b];v+=void 0!==P?P:0}r>v&&(r=v),o>y&&(o=y);var O=v+g.xAdvance,R=y+u;a<O&&(a=O),h<R&&(h=R),d+=g.xAdvance+c,w=g,b=p,C=O*m}}else d=0,f+=u,w=null,S[E]=C,C>A&&(A=C),C<_&&(_=C),E++,C=0;S[E]=C,C>A&&(A=C),C<_&&(_=C);var L=i.local,D=i.global,F=i.lines;return L.x=r*m,L.y=o*m,L.width=a*m,L.height=h*m,D.x=t.x-t.displayOriginX+r*x,D.y=t.y-t.displayOriginY+o*T,D.width=a*x,D.height=h*T,F.shortest=_,F.longest=A,F.lengths=S,e&&(L.x=Math.round(L.x),L.y=Math.round(L.y),L.width=Math.round(L.width),L.height=Math.round(L.height),D.x=Math.round(D.x),D.y=Math.round(D.y),D.width=Math.round(D.width),D.height=Math.round(D.height),F.shortest=Math.round(_),F.longest=Math.round(A)),i}},function(t,e,i){var n=i(0),s=i(17),r=i(16),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i<t;i++){n=this._pendingRemoval[i];var s=this._list.indexOf(n);s>-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i<this._list.length;i++){var n=this._list[i];n.active&&n.preUpdate.call(n,t,e)}},remove:function(t){var e=this._list.indexOf(t);return-1!==e&&this._list.splice(e,1),t},removeAll:function(){for(var t=this._list.length;t--;)this.remove(this._list[t]);return this},shutdown:function(){for(var t=this._list.length;t--;)this._list[t].destroy(!0);for(t=this._pendingRemoval.length;t--;)this._pendingRemoval[t].destroy(!0);for(t=this._pendingInsertion.length;t--;)this._pendingInsertion[t].destroy(!0);this._list.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var e=this.systems.events;e.off(r.PRE_UPDATE,this.preUpdate,this),e.off(r.UPDATE,this.update,this),e.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null},length:{get:function(){return this._list.length}}});s.register("UpdateList",o,"updateList"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[s]=e,t}}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o<r;o++){var a=t[o];a.hasOwnProperty(e)&&(a[e]=i)}return t}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e,i){var n=i(97);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h<a.length;h++){var l=a[h];s.call(r,l)}return a}return[]}},function(t,e,i){var n=i(97);t.exports=function(t,e,i,s){if(void 0===s&&(s=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(372);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o<r;o++)s.push(t),t+=i;return s}},function(t,e){t.exports=function(t,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var o=i?i+r.toString():r.toString();n&&(o=o.concat(n)),s.push(o)}else s.push(r);return s}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-1){var n=t[i+1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o<r;o++){var a=t[o];if(!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}return null}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var o=[];if(n(t,s,r))for(var a=s;a<r;a++){var h=t[a];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&o.push(h)}return o}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r)){var o,a=[null];for(o=5;o<arguments.length;o++)a.push(arguments[o]);for(o=s;o<r;o++)a[0]=t[o],e.apply(i,a)}return t}},function(t,e){t.exports=function(t,e,i){var n,s=[null];for(n=3;n<arguments.length;n++)s.push(arguments[n]);for(n=0;n<t.length;n++)s[0]=t[n],e.apply(i,s);return t}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var o=0;if(n(t,s,r))for(var a=s;a<r;a++)t[a][e]===i&&o++;return o}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e){t.exports=function(t,e,i,n,s,r){if(void 0===i&&(i=0),void 0===r&&(r=t),n>0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(s,h)}return e}},function(t,e,i){var n=i(119);t.exports=function(t){return n(t,-90)}},function(t,e,i){var n=i(119);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(119);t.exports=function(t){return n(t,180)}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e,i){var n=i(193),s=i(173);t.exports=function(t){var e="";if(!s(t))return e;for(var i=0;i<t.length;i++){for(var r=0;r<t[i].length;r++){var o=t[i][r].toString();e+="undefined"!==o?n(o,2):"?",r<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var a=0;a<t[i].length;a++)e+="---",a<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e,i){t.exports={CheckMatrix:i(173),MatrixToString:i(899),ReverseColumns:i(898),ReverseRows:i(897),Rotate180:i(896),RotateLeft:i(895),RotateMatrix:i(119),RotateRight:i(894),TransposeMatrix:i(318)}},function(t,e,i){var n=i(0),s=i(120),r=i(17),o=i(16),a=i(118),h=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(a.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list.length;t--;)this.list[t].destroy(!0);this.list.length=0,this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DisplayList",h,"displayList"),t.exports=h},function(t,e,i){var n={Events:i(133),DisplayList:i(901),GameObjectCreator:i(14),GameObjectFactory:i(5),UpdateList:i(873),Components:i(13),BuildGameObject:i(30),BuildGameObjectAnimation:i(315),GameObject:i(18),BitmapText:i(117),Blitter:i(171),Container:i(170),DynamicBitmapText:i(169),Extern:i(312),Graphics:i(168),Group:i(94),Image:i(93),Particles:i(846),PathFollower:i(300),RenderTexture:i(164),RetroFont:i(837),Sprite:i(67),Text:i(163),TileSprite:i(162),Zone:i(137),Shape:i(29),Arc:i(298),Curve:i(297),Ellipse:i(296),Grid:i(295),IsoBox:i(294),IsoTriangle:i(293),Line:i(292),Polygon:i(291),Rectangle:i(286),Star:i(285),Triangle:i(284),Factories:{Blitter:i(792),Container:i(791),DynamicBitmapText:i(790),Extern:i(789),Graphics:i(788),Group:i(787),Image:i(786),Particles:i(785),PathFollower:i(784),RenderTexture:i(783),Sprite:i(782),StaticBitmapText:i(781),Text:i(780),TileSprite:i(779),Zone:i(778),Arc:i(777),Curve:i(776),Ellipse:i(775),Grid:i(774),IsoBox:i(773),IsoTriangle:i(772),Line:i(771),Polygon:i(770),Rectangle:i(769),Star:i(768),Triangle:i(767)},Creators:{Blitter:i(766),Container:i(765),DynamicBitmapText:i(764),Graphics:i(763),Group:i(762),Image:i(761),Particles:i(760),RenderTexture:i(759),Sprite:i(758),StaticBitmapText:i(757),Text:i(756),TileSprite:i(755),Zone:i(754)}};n.Mesh=i(116),n.Quad=i(159),n.Factories.Mesh=i(750),n.Factories.Quad=i(749),n.Creators.Mesh=i(748),n.Creators.Quad=i(747),n.Light=i(281),i(280),i(746),t.exports=n},function(t,e){var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c<o.length;c++){var d=o[c].match(a);if(d){var f="- "===d[1],p=d[2],g=d[3];if(f&&(l!==h&&(n(t,e,l,u),h=l),u={x:0,y:0,width:0,height:0}),"name"!==p)switch(p){case"x":case"y":case"width":case"height":u[p]=parseInt(g,10)}else l=g}}return l!==h&&n(t,e,l,u),t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,T=e.x,w=s-T,b=s-(g-f-T),S=e.y,_=r-S,A=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var E=l,C=l,M=0,P=e.sourceIndex,O=0;O<m;O++){for(var R=0===O,L=O===m-1,D=0;D<y;D++){var F=0===D,k=D===y-1;if(o=t.add(M,P,c+E,d+C,s,r),F||R||k||L){var I=F?T:0,B=R?S:0,Y=0,N=0;F&&(Y+=s-w),k&&(Y+=s-b),R&&(N+=r-_),L&&(N+=r-A);var X=s-Y,z=r-N;o.cutWidth=X,o.cutHeight=z,o.setTrim(s,r,I,B,X,z)}E+=u,E+=F?w:k?b:s,M++}E=l,C+=u,C+=R?_:L?A:r}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o,a){var h=n(a,"frameWidth",null),l=n(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=n(a,"startFrame",0),d=n(a,"endFrame",-1),f=n(a,"margin",0),p=n(a,"spacing",0),g=Math.floor((r-f+p)/(h+p))*Math.floor((o-f+p)/(l+p));0===g&&console.warn("SpriteSheet frame dimensions will result in zero frames."),(c>g||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,T=0;T<g;T++){m=0,x=0;var w=v+h,b=y+l;w>r&&(m=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(70);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=n(h)}for(var l in i)"frames"!==l&&(Array.isArray(i[l])?t.customData[l]=i[l].slice(0):t.customData[l]=i[l]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var n=i(70);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a<o.length;a++){var h=o[a];r=t.add(h.filename,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),h.anchor&&(r.customPivot=!0,r.pivotX=h.anchor.x,r.pivotY=h.anchor.y),r.customData=n(h)}for(var l in i)"frames"!==l&&(Array.isArray(i[l])?t.customData[l]=i[l].slice(0):t.customData[l]=i[l]);return t}console.warn("Invalid Texture Atlas JSON Array")}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;o<r.length;o++){var a=r[o].attributes,h=a.name.value,l=parseInt(a.x.value,10),u=parseInt(a.y.value,10),c=parseInt(a.width.value,10),d=parseInt(a.height.value,10);if(s=t.add(h,e,l,u,c,d),a.frameX){var f=Math.abs(parseInt(a.frameX.value,10)),p=Math.abs(parseInt(a.frameY.value,10)),g=parseInt(a.frameWidth.value,10),v=parseInt(a.frameHeight.value,10);s.setTrim(c,d,f,p,g,v)}}return t}console.warn("Invalid Texture Atlas XML given")}},function(t,e,i){var n=i(0),s=i(23),r=i(32),o=i(127),a=i(175),h=new n({Extends:a,initialize:function(t,e,i,n,s){a.call(this,t,e,i,n,s),this.add("__BASE",0,0,0,n,s),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=n,this.height=s,this.imageData=this.context.getImageData(0,0,n,s),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var s=this.manager.getFrame(t,e);if(s){var r=s.canvasData,o=s.cutWidth,a=s.cutHeight,h=s.source.resolution;return this.context.drawImage(s.source.image,r.x,r.y,o,a,i,n,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,n,s,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i){return e=Math.abs(Math.floor(e)),i=Math.abs(Math.floor(i)),this.context.putImageData(t,e,i),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d<l;d++){for(var f=[],p=o;p<a;p++)u=this.getPixel(p,d,u),f.push({x:p,y:d,color:u.color,alpha:u.alphaGL});c.push(f)}return c},getIndex:function(t,e){return t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height?4*(t+e*this.width):-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),this.context.clearRect(t,e,i,n),this.update()},setSize:function(t,e){return void 0===e&&(e=t),t===this.width&&e===this.height||(this.canvas.width=t,this.canvas.height=e,this._source.width=t,this._source.height=e,this._source.isPowerOf2=o(t,e),this.frames.__BASE.setSize(t,e,0,0),this.refresh()),this},destroy:function(){a.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});t.exports=h},function(t,e){t.exports="volume"},function(t,e){t.exports="unlocked"},function(t,e){t.exports="stop"},function(t,e){t.exports="stopall"},function(t,e){t.exports="seek"},function(t,e){t.exports="resume"},function(t,e){t.exports="resumeall"},function(t,e){t.exports="rate"},function(t,e){t.exports="play"},function(t,e){t.exports="pause"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="mute"},function(t,e){t.exports="looped"},function(t,e){t.exports="loop"},function(t,e){t.exports="volume"},function(t,e){t.exports="rate"},function(t,e){t.exports="mute"},function(t,e){t.exports="detune"},function(t,e){t.exports="detune"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){var n=i(2),s=i(330);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e){t.exports="start"},function(t,e){t.exports="progress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="load"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="complete"},function(t,e){t.exports="addfile"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="resize"},function(t,e){t.exports="orientationchange"},function(t,e){t.exports="leavefullscreen"},function(t,e){t.exports="fullscreenunsupported"},function(t,e){t.exports="enterfullscreen"},function(t,e){t.exports="update"},function(t,e){t.exports="start"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="update"},function(t,e){t.exports="process"},function(t,e){t.exports="boot"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="drop"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="dragend"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameout"},function(t,e){t.exports="drop"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="dragend"},function(t,e){t.exports="destroy"},function(t,e){t.exports="boot"},function(t,e,i){var n=i(179),s=i(415),r=i(412),o=i(24),a=i(0),h=i(390),l=i(367),u=i(134),c=i(365),d=i(389),f=i(351),p=i(11),g=i(26),v=i(342),y=i(17),m=i(336),x=i(335),T=i(332),w=i(328),b=i(126),S=i(321),_=i(364),A=i(362),E=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new S(this),this.cache=new r(this),this.registry=new u(this),this.input=new v(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=d,this.scale=new x(this,this.config),this.sound=w.create(this),this.loop=new _(this,this.config.fps),this.plugins=new m(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),c(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(g.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(g.POST_RENDER,n,t,e)},headlessStep:function(t,e){var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),i.emit(g.PRE_RENDER),i.emit(g.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.frame.time},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=E},function(t,e,i){var n=i(0),s=i(11),r=i(17),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){t.exports={EventEmitter:i(996)}},function(t,e,i){var n={AddToDOM:i(179),DOMContentLoaded:i(351),GetScreenOrientation:i(350),GetTarget:i(345),ParseXML:i(344),RemoveFromDOM:i(343),RequestAnimationFrame:i(363)};t.exports=n},function(t,e,i){t.exports={BitmapMask:i(426),GeometryMask:i(425)}},function(t,e,i){var n=i(353);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){var n=i(184),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(129),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(190);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(32),s=i(352);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e){t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e,i){t.exports={CanvasInterpolation:i(366),CanvasPool:i(24),Smoothing:i(130),TouchAction:i(1007),UserSelect:i(1006)}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e,i){t.exports={CenterOn:i(444),GetBottom:i(51),GetCenterX:i(81),GetCenterY:i(78),GetLeft:i(49),GetOffsetX:i(1010),GetOffsetY:i(1009),GetRight:i(47),GetTop:i(45),SetBottom:i(50),SetCenterX:i(80),SetCenterY:i(79),SetLeft:i(48),SetRight:i(46),SetTop:i(44)}},function(t,e,i){var n=i(47),s=i(45),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(49),s=i(45),r=i(50),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(81),s=i(45),r=i(50),o=i(80);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(47),s=i(45),r=i(48),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(78),s=i(47),r=i(79),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(47),r=i(50),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(45),r=i(46),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(78),s=i(49),r=i(79),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(47),r=i(46),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(48),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(81),r=i(80),o=i(44);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){t.exports={BottomCenter:i(1023),BottomLeft:i(1022),BottomRight:i(1021),LeftBottom:i(1020),LeftCenter:i(1019),LeftTop:i(1018),RightBottom:i(1017),RightCenter:i(1016),RightTop:i(1015),TopCenter:i(1014),TopLeft:i(1013),TopRight:i(1012)}},function(t,e,i){t.exports={BottomCenter:i(448),BottomLeft:i(447),BottomRight:i(446),Center:i(445),LeftCenter:i(443),QuickSet:i(449),RightCenter:i(442),TopCenter:i(441),TopLeft:i(440),TopRight:i(439)}},function(t,e,i){var n=i(208),s=i(19),r={In:i(1025),To:i(1024)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(1026),Bounds:i(1011),Canvas:i(1008),Color:i(354),Masks:i(999)}},function(t,e,i){var n=i(0),s=i(134),r=i(17),o=i(16),a=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},function(t,e,i){t.exports={DataManager:i(134),DataManagerPlugin:i(1028),Events:i(420)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},function(t,e,i){var n=i(0),s=i(359),r=i(358),o=i(5),a=i(357),h=i(1030),l=i(356),u=i(10),c=i(355),d=i(3),f=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i<this.curves.length;i++){var n=this.curves[i];n.active&&n.draw(t,e)}return t},ellipseTo:function(t,e,i,n,s,o){var a=new r(0,0,t,e,i,n,s,o),h=this.getEndPoint(this._tmpVec2A),l=a.getStartPoint(this._tmpVec2B);return h.subtract(l),a.x=h.x,a.y=h.y,this.add(a)},fromJSON:function(t){this.curves=[],this.cacheLengths=[],this.startPoint.set(t.x,t.y),this.autoClose=t.autoClose;for(var e=0;e<t.curves.length;e++){var i=t.curves[e];switch(i.type){case"LineCurve":this.add(a.fromJSON(i));break;case"EllipseCurve":this.add(r.fromJSON(i));break;case"SplineCurve":this.add(c.fromJSON(i));break;case"CubicBezierCurve":this.add(s.fromJSON(i));break;case"QuadraticBezierCurve":this.add(l.fromJSON(i))}}return this},getBounds:function(t,e){void 0===t&&(t=new u),void 0===e&&(e=16),t.x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new u,n=Number.MIN_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,r=0;r<this.curves.length;r++){var o=this.curves[r];o.active&&(o.getBounds(i,e),t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),n=Math.max(n,i.right),s=Math.max(s,i.bottom))}return t.right=n,t.bottom=s,t},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0;i<this.curves.length;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s<n.length;){if(n[s]>=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n<this.curves.length;n++){var s=this.curves[n];if(s.active)for(var r=s.getResolution(t),o=s.getPoints(r),a=0;a<o.length;a++){var h=o[a];e&&e.equals(h)||(i.push(h),e=h)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e<this.curves.length;e++)t.push(this.curves[e].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:t}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});o.register("path",function(t,e){return new f(t,e)}),t.exports=f},function(t,e,i){t.exports={Path:i(1031),CubicBezier:i(359),Curve:i(76),Ellipse:i(358),Line:i(357),QuadraticBezier:i(356),Spline:i(355)}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e,i){t.exports={ARNE16:i(360),C64:i(1036),CGA:i(1035),JMP:i(1034),MSX:i(1033)}},function(t,e,i){t.exports={GenerateTexture:i(361),Palettes:i(1037)}},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{","    gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);","","    outTexCoord = inTexCoord;","    outTint = inTint;","    outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{","    vec4 texture = texture2D(uMainSampler, outTexCoord);","    vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);","    vec4 color = texture;","","    if (outTintEffect == 0.0)","    {","        //  Multiply texture tint","        color = texture * texel;","    }","    else if (outTintEffect == 1.0)","    {","        //  Solid color + texture alpha","        color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);","        color.a = texture.a * texel.a;","    }","    else if (outTintEffect == 2.0)","    {","        //  Solid color, no texture","        color = texel;","    }","","    gl_FragColor = color;","}",""].join("\n")},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{","    vec2 position;","    vec3 color;","    float intensity;","    float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{","    vec3 finalColor = vec3(0.0, 0.0, 0.0);","    vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);","    vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;","    vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));","    vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;","","    for (int index = 0; index < kMaxLights; ++index)","    {","        Light light = uLights[index];","        vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);","        vec3 lightNormal = normalize(lightDir);","        float distToSurf = length(lightDir) * uCamera.w;","        float diffuseFactor = max(dot(normal, lightNormal), 0.0);","        float radius = (light.radius / res.x * uCamera.w) * uCamera.w;","        float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);","        vec3 diffuse = light.color * diffuseFactor;","        finalColor += (attenuation * diffuse) * light.intensity;","    }","","    vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);","    gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{","    gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{","    vec2 uv = gl_FragCoord.xy / uResolution;","    vec4 mainColor = texture2D(uMainSampler, uv);","    vec4 maskColor = texture2D(uMaskSampler, uv);","    float alpha = mainColor.a;","","    if (!uInvertMaskAlpha)","    {","        alpha *= (maskColor.a);","    }","    else","    {","        alpha *= (1.0 - maskColor.a);","    }","","    gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports="removetexture"},function(t,e){t.exports="ready"},function(t,e){t.exports="onload"},function(t,e){t.exports="onerror"},function(t,e){t.exports="addtexture"},function(t,e,i){var n=i(182),s=i(369),r=i(368),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o<t;o++)e+=(i-=e*n)*n,s[o]=i,r[o]=e;return{sin:r,cos:s,length:t}}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var s=(t-e)/(i-e);return s>1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},function(t,e){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n<t.length;n++)e=.02519603282416938*(i+=t.charCodeAt(n)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+1.1102230246251565e-16*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){t.exports={Ceil:i(375),Floor:i(98),To:i(1069)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={GetNext:i(376),IsSize:i(127),IsValue:i(1071)}},function(t,e,i){var n=i(196);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(129);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(185);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},function(t,e,i){var n=i(381);t.exports=function(t,e){for(var i=0,s=t.length-1,r=0;r<=s;r++)i+=Math.pow(1-e,s-r)*Math.pow(e,r)*t[r]*n(s,r);return i}},function(t,e,i){t.exports={Bezier:i(1076),CatmullRom:i(1075),CubicBezier:i(379),Linear:i(1074),QuadraticBezier:i(378),SmoothStep:i(377),SmootherStep:i(1073)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e,i){t.exports={Ceil:i(1079),Equal:i(186),Floor:i(1078),GreaterThan:i(383),LessThan:i(382)}},function(t,e,i){t.exports={Back:i(402),Bounce:i(401),Circular:i(400),Cubic:i(399),Elastic:i(398),Expo:i(397),Linear:i(396),Quadratic:i(395),Quartic:i(394),Quintic:i(393),Sine:i(392),Stepped:i(391)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===s&&(s=2),Math.sqrt(Math.pow(i-t,s)+Math.pow(n-e,s))}},function(t,e,i){t.exports={Between:i(56),Power:i(1082),Squared:i(384)}},function(t,e){t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},function(t,e,i){var n=i(20);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),e>t?t+=i:e<t&&(t-=i)),t)}},function(t,e,i){var n=i(385);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(20);t.exports=function(t){return Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e,i){t.exports={Between:i(386),BetweenPoints:i(1090),BetweenPointsY:i(1089),BetweenY:i(1088),CounterClockwise:i(1087),Normalize:i(385),Reverse:i(1086),RotateTo:i(1085),ShortestBetween:i(1084),Wrap:i(214),WrapDegrees:i(213)}},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;t<s.length;t++)if(document.documentElement[s[t]]){i.available=!0,i.request=s[t];break}var r=["cancel"+n,"exit"+e,"webkitCancel"+n,"webkitExit"+e,"msCancel"+n,"msExit"+e,"mozCancel"+n,"mozExit"+e];if(i.available)for(t=0;t<r.length;t++)if(document[r[t]]){i.cancel=r[t];break}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(i.keyboard=!0),Object.defineProperty(i,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),i}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e,i){var n=i(128),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e,i){var n=i(99),s=i(128),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,l=[],u=!1,c=-1;function d(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c<e;)h&&h[c].run();c=-1,e=l.length}h=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];l.push(new p(t,e)),1!==l.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=g,s.addListener=g,s.once=g,s.off=g,s.removeListener=g,s.removeAllListeners=g,s.emit=g,s.prependListener=g,s.prependOnceListener=g,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,e,i){t.exports={Config:i(390),CreateRenderer:i(367),DebugHeader:i(365),Events:i(26),TimeStep:i(364),VisibilityHandler:i(362)}},function(t,e){t.exports="wake"},function(t,e){t.exports="update"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="start"},function(t,e){t.exports="sleep"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="resume"},function(t,e){t.exports="render"},function(t,e){t.exports="ready"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="pause"},function(t,e){t.exports="destroy"},function(t,e){t.exports="boot"},function(t,e,i){var n=i(411),s=i(0),r=i(2),o=i(17),a=i(42),h=i(16),l=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,t.sys.events.once(h.BOOT,this.boot,this),t.sys.events.on(h.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(h.UPDATE,this.update,this),e.once(h.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s<t.length;s++){var r=t[s];r&&r.id===e&&(n=!0)}if(!n)return e;e<<=1}return 0},getTotal:function(t){void 0===t&&(t=!1);for(var e=0,i=this.cameras,n=0;n<i.length;n++){var s=i[n];(!t||t&&s.visible)&&e++}return e},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.scale.width,i=this.scene.sys.scale.height,n=0;n<t.length;n++){var s=t[n],o=r(s,"x",0),a=r(s,"y",0),h=r(s,"width",e),l=r(s,"height",i),u=this.add(o,a,h,l);u.name=r(s,"name",""),u.zoom=r(s,"zoom",1),u.rotation=r(s,"rotation",0),u.scrollX=r(s,"scrollX",0),u.scrollY=r(s,"scrollY",0),u.roundPixels=r(s,"roundPixels",!1),u.visible=r(s,"visible",!0);var c=r(s,"backgroundColor",!1);c&&u.setBackgroundColor(c);var d=r(s,"bounds",null);if(d){var f=r(d,"x",0),p=r(d,"y",0),g=r(d,"width",e),v=r(d,"height",i);u.setBounds(f,p,g,v)}}return this},getCamera:function(t){for(var e=this.cameras,i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},getCamerasBelowPointer:function(t){for(var e=this.cameras,i=t.x,n=t.y,s=[],r=0;r<e.length;r++){var o=e[r];o.visible&&o.inputEnabled&&a(o,i,n)&&s.unshift(o)}return s},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,n=this.cameras,s=0;s<t.length;s++){var r=n.indexOf(t[s]);-1!==r&&(e&&n[r].destroy(),n.splice(r,1),i++)}return!this.main&&n[0]&&(this.main=n[0]),i},render:function(t,e,i){for(var n=this.scene,s=this.cameras,r=0;r<this.cameras.length;r++){var o=s[r];o.visible&&o.alpha>0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].update(t,e)},resize:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].setSize(t,e)},shutdown:function(){this.main=void 0;for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();this.cameras=[];var e=this.systems.events;e.off(h.UPDATE,this.update,this),e.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});o.register("CameraManager",l,"cameras"),t.exports=l},function(t,e,i){var n=i(23),s=i(0),r=i(188),o=i(40),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t),h)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=a},function(t,e,i){var n=i(23),s=i(0),r=i(40),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var i=this.intensity,s=this.camera._cw,r=this.camera._ch,o=this.camera.zoom;this._offsetX=(Math.random()*i.x*s*2-i.x*s)*o,this._offsetY=(Math.random()*i.y*r*2-i.y*r)*o,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});t.exports=a},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var n=i(23),s=i(0),r=i(188),o=i(40),a=i(3),h=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a,h){void 0===i&&(i=1e3),void 0===n&&(n=r.Linear),void 0===s&&(s=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!s&&this.isRunning?l:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof n&&r.hasOwnProperty(n)?this.ease=r[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e),l)},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed<this.duration){var r=this.ease(i);s.getScroll(this.destination.x,this.destination.y,this.current);var o=this.source.x+(this.current.x-this.source.x)*r,a=this.source.y+(this.current.y-this.source.y)*r;s.setScroll(o,a),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,o,a)}else s.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,s.scrollX,s.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.PAN_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=h},function(t,e,i){var n=i(23),s=i(0),r=i(40),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===s&&(s=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this.alpha=1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,n),this.camera)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=1-this.progress:this.effectComplete())},postRenderCanvas:function(t){if(!this.isRunning)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e._cx,e._cy,e._cw,e._ch),!0},postRenderWebGL:function(t,e){if(!this.isRunning)return!1;var i=this.camera,n=this.red/255,s=this.blue/255,r=this.green/255;return t.drawFillRect(i._cx,i._cy,i._cw,i._ch,e(n,r,s,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},function(t,e,i){var n=i(23),s=i(0),r=i(40),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:this.effectComplete())},postRenderCanvas:function(t){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e._cx,e._cy,e._cw,e._ch),!0},postRenderWebGL:function(t,e){if(!this.isRunning&&!this.isComplete)return!1;var i=this.camera,n=this.red/255,s=this.blue/255,r=this.green/255;return t.drawFillRect(i._cx,i._cy,i._cw,i._ch,e(n,r,s,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?r.FADE_OUT_COMPLETE:r.FADE_IN_COMPLETE;this.camera.emit(t,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},function(t,e){t.exports="camerazoomstart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="prerender"},function(t,e){t.exports="postrender"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="cameradestroy"},function(t,e,i){t.exports={Camera:i(411),CameraManager:i(1116),Effects:i(403),Events:i(40)}},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.accelX=0,this.accelY=0;var e=s(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=s(t,"acceleration.x",0),this.accelY=s(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=s(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=s(t,"drag.x",0),this.dragY=s(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=s(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=s(t,"maxSpeed.x",0),this.maxSpeedY=s(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={FixedKeyControl:i(1171),SmoothedKeyControl:i(1170)}},function(t,e,i){t.exports={Controls:i(1172),Scene2D:i(1169)}},function(t,e){t.exports="remove"},function(t,e){t.exports="add"},function(t,e,i){t.exports={BaseCache:i(414),CacheManager:i(412),Events:i(413)}},function(t,e){t.exports="visible"},function(t,e){t.exports="step"},function(t,e){t.exports="resume"},function(t,e){t.exports="ready"},function(t,e){t.exports="prestep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="postrender"},function(t,e){t.exports="pause"},function(t,e){t.exports="hidden"},function(t,e){t.exports="focus"},function(t,e){t.exports="destroy"},function(t,e){t.exports="boot"},function(t,e){t.exports="blur"},function(t,e,i){t.exports={Animation:i(205),AnimationFrame:i(433),AnimationManager:i(415),Events:i(136)}},function(t,e,i){var n=i(57);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s<t.length;s++){var r=t[s];r.x=n(r.x,e.left-i,e.right+i),r.y=n(r.y,e.top-i,e.bottom+i)}return t}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},function(t,e){t.exports=function(t,e,i,n,s){void 0===s&&(s=!1);var r,o=Math.abs(n-i)/t.length;if(s)for(r=0;r<t.length;r++)t[r][e]+=r*o;else for(r=0;r<t.length;r++)t[r][e]=r*o;return t}},function(t,e,i){var n=i(195);t.exports=function(t,e,i,s,r){void 0===r&&(r=!1);var o,a=Math.abs(s-i)/t.length;if(r)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,s);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,s);return t}},function(t,e,i){var n=i(196);t.exports=function(t,e,i,s,r){void 0===r&&(r=!1);var o,a=Math.abs(s-i)/t.length;if(r)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,s);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,s);return t}},function(t,e,i){var n=i(132);t.exports=function(t){return n(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){var o,a,h,l,u,c;if(void 0===s&&(s=0),void 0===r&&(r=new n),t.length>1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h<t.length;h++)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[0].x=e,t[0].y=i}else o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;return r.x=o,r.y=a,r}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s){return n(t,"visible",e,0,i,s)}},function(t,e){t.exports=function(t,e,i,n,s){for(var r=0;r<t.length;r++)t[r].setTint(e,i,n,s);return t}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"scaleY",e,i,s,r)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"scaleX",e,i,s,r)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"scaleX",e,s,o,a),n(t,"scaleY",i,r,o,a)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"rotation",e,i,s,r)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"originX",e,s,o,a),n(t,"originY",i,r,o,a)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].setInteractive(e,i);return t}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"depth",e,i,s,r)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s){return n(t,"blendMode",e,0,i,s)}},function(t,e,i){var n=i(27);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"scaleY",e,i,s,r)}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"scaleX",e,s,o,a),n(t,"scaleY",i,r,o,a)}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"scaleX",e,i,s,r)}},function(t,e,i){var n=i(197);t.exports=function(t,e,i,s){var r=e.x,o=e.y;if(0===s)return t;for(var a=0;a<t.length;a++)n(t[a],r,o,i,s);return t}},function(t,e,i){var n=i(197),s=i(56);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a<t.length;a++){var h=t[a];n(h,r,o,i,Math.max(1,s(h.x,h.y,r,o)))}return t}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"rotation",e,i,s,r)}},function(t,e,i){var n=i(198);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(201);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(202);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(199);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(206);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].anims.play(e,i);return t}},function(t,e,i){var n=i(416);t.exports=function(t,e,i){var s=n({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=n({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=n({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);s.pop(),r.pop(),o.pop();for(var a=(s=s.concat(r,o)).length/t.length,h=0,l=0;l<t.length;l++){var u=t[l],c=s[Math.floor(h)];u.x=c.x,u.y=c.y,h+=a}return t}},function(t,e,i){var n=i(419),s=i(418),r=i(417);t.exports=function(t,e,i){void 0===i&&(i=0);var o=n(e,!1,t.length);i>0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a<t.length;a++)t[a].x=o[a].x,t[a].y=o[a].y;return t}},function(t,e,i){var n=i(203);t.exports=function(t,e){for(var i=n(e,t.length),s=0;s<t.length;s++){var r=t[s],o=i[s];r.x=o.x,r.y=o.y}return t}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=e.width/2,a=e.height/2,h=0;h<t.length;h++)t[h].x=e.x+o*Math.cos(s),t[h].y=e.y+a*Math.sin(s),s+=r;return t}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o<t.length;o++)t[o].x=e.x+e.radius*Math.cos(s),t[o].y=e.y+e.radius*Math.sin(s),s+=r;return t}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e){t.exports="destroy"},function(t,e){t.exports="setdata"},function(t,e){t.exports="removedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="changedata"},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e,i){var n=i(101),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(10),s=i(428),r=i(3),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,s,r,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){t.exports="animationupdate"},function(t,e){t.exports="animationstart"},function(t,e){t.exports="animationrestart"},function(t,e){t.exports="animationrepeat"},function(t,e){t.exports="animationupdate-"},function(t,e){t.exports="animationstart-"},function(t,e){t.exports="animationrestart-"},function(t,e){t.exports="animationrepeat-"},function(t,e){t.exports="animationcomplete-"},function(t,e){t.exports="animationcomplete"},function(t,e){t.exports="resumeall"},function(t,e){t.exports="remove"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="start"},function(t,e){t.exports="restart"},function(t,e){t.exports="repeat"},function(t,e){t.exports="complete"},function(t,e){t.exports="add"},function(t,e,i){var n=i(449),s=i(208),r=i(2),o=i(1),a=new(i(137))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1);t.exports=function(t,e){void 0===e&&(e={});var i=r(e,"width",-1),o=r(e,"height",-1),h=r(e,"cellWidth",1),l=r(e,"cellHeight",h),u=r(e,"position",s.TOP_LEFT),c=r(e,"x",0),d=r(e,"y",0),f=0,p=0,g=i*h,v=o*l;a.setPosition(c,d),a.setSize(h,l);for(var y=0;y<t.length;y++)if(n(t[y],a,u),-1===i)p+=l,a.y+=l,p===v&&(p=0,a.x+=h,a.y=d);else if(-1===o)f+=h,a.x+=h,f===g&&(f=0,a.x=c,a.y+=l);else if(f+=h,a.x+=h,f===g&&(f=0,p+=l,a.x=c,a.y+=l,p===v))break;return t}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++){var s=t[n],r=!0;for(var o in e)s[o]!==e[o]&&(r=!1);if(r)return s}return null}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++){var s=t[n],r=!0;for(var o in e)s[o]!==e[o]&&(r=!1);if(r)return s}return null}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var s=t[n];e.call(i,s)}return t}},function(t,e,i){var n=i(35);t.exports=function(t,e,i,s,r){return n(t,"angle",e,i,s,r)}},function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e<this.length;e++)this[e]=0}else{Array.call(this,t.length),this.length=t.length;for(e=0;e<this.length;e++)this[e]=t[e]}},window[t].prototype=e,window[t].constructor=window[t]};i("Float32Array"),i("Uint32Array"),i("Uint16Array"),i("Int16Array"),i("ArrayBuffer")}},function(t,e,i){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var i=Date.now(),n=["ms","moz","webkit","o"],s=0;s<n.length&&!t.requestAnimationFrame;++s)t.requestAnimationFrame=t[n[s]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[n[s]+"CancelAnimationFrame"]||t[n[s]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+i-e;return n<0&&(n=0),i=e,setTimeout(function(){i=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,i(215))},function(t,e){!function(){if("performance"in window==!1&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==!1){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-t}}}()},function(t,e){Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)})},function(t,e){window.console||(window.console={},window.console.log=window.console.assert=function(){},window.console.warn=window.console.assert=function(){})},function(t,e){!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext,AudioContext.prototype.hasOwnProperty("createGain")||(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),AudioContext.prototype.hasOwnProperty("createDelay")||(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),AudioContext.prototype.hasOwnProperty("createScriptProcessor")||(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),AudioContext.prototype.hasOwnProperty("createPeriodicWave")||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,n){void 0!==n?e.internal_start(t||0,i,n):e.internal_start(t||0,i||0)}):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},AudioContext.prototype.hasOwnProperty("createOscillator")&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=webkitOfflineAudioContext)}()},function(t,e){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s<i;s++)s in e&&t.call(n,e[s],s,e)})},function(t,e,i){i(1279),i(1278),i(1277),i(1276),i(1275),i(1274),i(1273),i(1272)},function(t,e,i){var n=i(138),s=i(0),r=i(36),o=i(149),a=i(1282),h=i(11),l=i(545),u=i(2),c=i(4),d=i(72),f=i(210),p=i(544),g=i(539),v=i(87),y=new s({Extends:h,initialize:function(t,e){h.call(this),this.scene=t,this.engine=a.create(e),this.localWorld=this.engine.world;var i=c(e,"gravity",null);if(i&&this.setGravity(i.x,i.y,i.scale),this.walls={left:null,right:null,top:null,bottom:null},u(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=u(n,"x",0),r=u(n,"y",0),o=u(n,"width",t.sys.scale.width),l=u(n,"height",t.sys.scale.height),d=u(n,"thickness",64),f=u(n,"left",!0),p=u(n,"right",!0),g=u(n,"top",!0),v=u(n,"bottom",!0);this.setBounds(s,r,o,l,d,f,p,g,v)}}this.enabled=c(e,"enabled",!0),this.correction=c(e,"correction",1),this.getDelta=c(e,"getDelta",this.update60Hz),this.autoUpdate=c(e,"autoUpdate",!0),this.drawDebug=c(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:u(e,"debugShowBody",!0),debugShowStaticBody:u(e,"debugShowStaticBody",!0),debugShowVelocity:u(e,"debugShowVelocity",!0),bodyDebugColor:u(e,"debugBodyColor",16711935),bodyDebugFillColor:u(e,"bodyDebugFillColor",14919651),staticBodyDebugColor:u(e,"debugBodyColor",255),velocityDebugColor:u(e,"debugVelocityColor",65280),debugShowJoint:u(e,"debugShowJoint",!0),jointDebugColor:u(e,"debugJointColor",0),debugWireframes:u(e,"debugWireframes",!0),debugShowInternalEdges:u(e,"debugShowInternalEdges",!1),debugShowConvexHulls:u(e,"debugShowConvexHulls",!1),debugConvexHullColor:u(e,"debugConvexHullColor",11184810),debugShowSleeping:u(e,"debugShowSleeping",!1)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy()},setEventsProxy:function(){var t=this,e=this.engine;f.on(e,"beforeUpdate",function(e){t.emit(l.BEFORE_UPDATE,e)}),f.on(e,"afterUpdate",function(e){t.emit(l.AFTER_UPDATE,e)}),f.on(e,"collisionStart",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(l.COLLISION_START,e,i,n)}),f.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(l.COLLISION_ACTIVE,e,i,n)}),f.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(l.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return o.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return o.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i<t.length;i++)new p(this,t[i],e);return this},nextGroup:function(t){return d.nextGroup(t)},nextCategory:function(){return d.nextCategory()},pause:function(){return this.enabled=!1,this.emit(l.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(l.RESUME),this},update:function(t,e){this.enabled&&this.autoUpdate&&a.update(this.engine,this.getDelta(t,e),this.correction)},step:function(t,e){a.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},postUpdate:function(){if(this.drawDebug){this.debugGraphic.clear();var t=o.allBodies(this.localWorld);this.defaults.debugWireframes?(this.defaults.debugShowConvexHulls&&this.renderConvexHulls(t),this.renderWireframes(t)):this.renderBodies(t),this.defaults.debugShowJoint&&this.renderJoints()}},renderConvexHulls:function(t){var e=this.debugGraphic;e.lineStyle(1,this.defaults.debugConvexHullColor),e.beginPath();for(var i=0;i<t.length;i++){var n=t[i];if(n.render.visible&&1!==n.parts.length){e.moveTo(n.vertices[0].x,n.vertices[0].y);for(var s=1;s<n.vertices.length;s++)e.lineTo(n.vertices[s].x,n.vertices[s].y);e.lineTo(n.vertices[0].x,n.vertices[0].y)}}e.strokePath()},renderWireframes:function(t){var e=this.debugGraphic,i=this.defaults.debugShowInternalEdges;e.lineStyle(1,this.defaults.bodyDebugColor),e.beginPath();for(var n=0;n<t.length;n++){var s=t[n];if(s.render.visible)for(var r=s.parts.length>1?1:0;r<s.parts.length;r++){var o=s.parts[r],a=o.vertices.length;e.moveTo(o.vertices[0].x,o.vertices[0].y);for(var h=1;h<a;h++)!o.vertices[h-1].isInternal||i?e.lineTo(o.vertices[h].x,o.vertices[h].y):e.moveTo(o.vertices[h].x,o.vertices[h].y),o.vertices[h].isInternal&&!i&&e.moveTo(o.vertices[(h+1)%a].x,o.vertices[(h+1)%a].y);e.lineTo(o.vertices[0].x,o.vertices[0].y)}}e.strokePath()},renderBodies:function(t){var e,i,n,s,r=this.debugGraphic,o=this.defaults.debugShowInternalEdges||!this.defaults.debugWireframes,a=this.defaults.debugShowSleeping,h=this.defaults.debugWireframes;for(n=0;n<t.length;n++)if((e=t[n]).render.visible)for(s=e.parts.length>1?1:0;s<e.parts.length;s++)if((i=e.parts[s]).render.visible){if(a&&e.isSleeping?(r.lineStyle(1,this.defaults.bodyDebugColor,.5*i.render.opacity),r.fillStyle(this.defaults.bodyDebugColor,.5*i.render.opacity)):(r.lineStyle(1,this.defaults.bodyDebugColor,i.render.opacity),r.fillStyle(this.defaults.bodyDebugColor,i.render.opacity)),i.circleRadius)r.beginPath(),r.arc(i.position.x,i.position.y,i.circleRadius,0,2*Math.PI);else{r.beginPath(),r.moveTo(i.vertices[0].x,i.vertices[0].y);for(var l=i.vertices.length,u=1;u<l;u++)!i.vertices[u-1].isInternal||o?r.lineTo(i.vertices[u].x,i.vertices[u].y):r.moveTo(i.vertices[u].x,i.vertices[u].y),i.vertices[u].isInternal&&!o&&r.moveTo(i.vertices[(u+1)%i.vertices.length].x,i.vertices[(u+1)%i.vertices.length].y);r.lineTo(i.vertices[0].x,i.vertices[0].y),r.closePath()}h?r.strokePath():r.fillPath()}},renderJoints:function(){var t=this.debugGraphic;t.lineStyle(2,this.defaults.jointDebugColor);for(var e=o.allConstraints(this.localWorld),i=0;i<e.length;i++){var n=e[i];if(n.render.visible&&n.pointA&&n.pointB){n.render.lineWidth&&t.lineStyle(n.render.lineWidth,r.colorToNumber(n.render.strokeStyle));var s,a,h=n.bodyA,l=n.bodyB;if(s=h?v.add(h.position,n.pointA):n.pointA,"pin"===n.render.type)t.beginPath(),t.arc(s.x,s.y,3,0,2*Math.PI),t.closePath();else{if(a=l?v.add(l.position,n.pointB):n.pointB,t.beginPath(),t.moveTo(s.x,s.y),"spring"===n.render.type)for(var u,c=v.sub(a,s),d=v.perp(v.normalise(c)),f=Math.ceil(r.clamp(n.length/5,12,20)),p=1;p<f;p+=1)u=p%2==0?1:-1,t.lineTo(s.x+c.x*(p/f)+d.x*u*4,s.y+c.y*(p/f)+d.y*u*4);t.lineTo(a.x,a.y)}n.render.lineWidth&&t.strokePath(),n.render.anchors&&(t.fillStyle(r.colorToNumber(n.render.strokeStyle)),t.beginPath(),t.arc(s.x,s.y,6,0,2*Math.PI),t.arc(a.x,a.y,6,0,2*Math.PI),t.closePath(),t.fillPath())}}},fromPath:function(t,e){void 0===e&&(e=[]);return t.replace(/L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/gi,function(t,i,n){e.push({x:parseFloat(i),y:parseFloat(n)})}),e},shutdown:function(){f.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),a.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},function(t,e,i){var n={};t.exports=n;var s=i(539),r=i(238),o=i(1283),a=i(1284),h=i(1309),l=i(1285),u=i(210),c=i(149),d=i(209),f=i(36),p=i(72);n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);if(t||n.render){var r={element:t,controller:Render};n.render=f.extend(r,n.render)}return n.render&&n.render.controller&&(n.render=n.render.controller.create(n.render)),n.render&&(n.render.engine=n),n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(t,e,i){e=e||1e3/60,i=i||1;var s,l=t.world,f=t.timing,p=t.broadphase,g=[];f.timestamp+=e*f.timeScale;var v={timestamp:f.timestamp};u.trigger(t,"beforeUpdate",v);var y=c.allBodies(l),m=c.allConstraints(l);for(h.reset(t.metrics),t.enableSleeping&&r.update(y,f.timeScale),n._bodiesApplyGravity(y,l.gravity),n._bodiesUpdate(y,e,f.timeScale,i,l.bounds),d.preSolveAll(y),s=0;s<t.constraintIterations;s++)d.solveAll(m,f.timeScale);d.postSolveAll(y),p.controller?(l.isModified&&p.controller.clear(p),p.controller.update(p,y,t,l.isModified),g=p.pairsList):g=y,l.isModified&&c.setModified(l,!1,!1,!0);var x=p.detector(g,t),T=t.pairs,w=f.timestamp;for(a.update(T,x,w),a.removeOld(T,w),t.enableSleeping&&r.afterCollisions(T.list,f.timeScale),T.collisionStart.length>0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s<t.positionIterations;s++)o.solvePosition(T.list,y,f.timeScale);for(o.postSolvePosition(y),d.preSolveAll(y),s=0;s<t.constraintIterations;s++)d.solveAll(m,f.timeScale);for(d.postSolveAll(y),o.preSolveVelocity(T.list),s=0;s<t.velocityIterations;s++)o.solveVelocity(T.list,f.timeScale);return T.collisionActive.length>0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(y),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s<i.length;s++){var o=i[s];r.set(o,!1),o.id=f.nextId()}}},n.clear=function(t){var e=t.world;a.clear(t.pairs);var i=t.broadphase;if(i.controller){var n=c.allBodies(e);i.controller.clear(i),i.controller.update(i,n,t,!0)}},n._bodiesClearForces=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.force.x=0,i.force.y=0,i.torque=0}},n._bodiesApplyGravity=function(t,e){var i=void 0!==e.scale?e.scale:.001;if((0!==e.x||0!==e.y)&&0!==i)for(var n=0;n<t.length;n++){var s=t[n];s.ignoreGravity||s.isStatic||s.isSleeping||(s.force.y+=s.mass*e.y*i,s.force.x+=s.mass*e.x*i)}},n._bodiesUpdate=function(t,e,i,n,s){for(var r=0;r<t.length;r++){var o=t[r];o.isStatic||o.isSleeping||p.update(o,e,i,n)}}},function(t,e,i){var n={};t.exports=n;var s=i(82),r=i(87),o=i(36),a=i(86);n._restingThresh=4,n._restingThreshTangent=6,n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n.preSolvePosition=function(t){var e,i,n;for(e=0;e<t.length;e++)(i=t[e]).isActive&&(n=i.activeContacts.length,i.collision.parentA.totalContacts+=n,i.collision.parentB.totalContacts+=n)},n.solvePosition=function(t,e,i){var s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,T=i*n._positionDampen;for(s=0;s<e.length;s++){var w=e[s];w.previousPositionImpulse.x=w.positionImpulse.x,w.previousPositionImpulse.y=w.positionImpulse.y}for(s=0;s<t.length;s++)(a=t[s]).isActive&&!a.isSensor&&(l=(h=a.collision).parentA,u=h.parentB,c=h.normal,p=l.previousPositionImpulse,g=u.previousPositionImpulse,f=h.penetration,y=g.x-p.x+f.x,m=g.y-p.y+f.y,d=(r=c.x)*y+(o=c.y)*m,a.separation=d,x=(d-a.slop)*T,(l.isStatic||u.isStatic)&&(x*=2),l.isStatic||l.isSleeping||(v=x/l.totalContacts,l.positionImpulse.x+=r*v,l.positionImpulse.y+=o*v),u.isStatic||u.isSleeping||(v=x/u.totalContacts,u.positionImpulse.x-=r*v,u.positionImpulse.y-=o*v))},n.postSolvePosition=function(t){for(var e=0;e<t.length;e++){var i=t[e];if(i.totalContacts=0,0!==i.positionImpulse.x||0!==i.positionImpulse.y){for(var o=0;o<i.parts.length;o++){var h=i.parts[o];s.translate(h.vertices,i.positionImpulse),a.update(h.bounds,h.vertices,i.velocity),h.position.x+=i.positionImpulse.x,h.position.y+=i.positionImpulse.y}i.positionPrev.x+=i.positionImpulse.x,i.positionPrev.y+=i.positionImpulse.y,r.dot(i.positionImpulse,i.velocity)<0?(i.positionImpulse.x=0,i.positionImpulse.y=0):(i.positionImpulse.x*=n._positionWarming,i.positionImpulse.y*=n._positionWarming)}}},n.preSolveVelocity=function(t){var e,i,n,s,o,a,h,l,u,c,d,f,p,g,v=r._temp[0],y=r._temp[1];for(e=0;e<t.length;e++)if((n=t[e]).isActive&&!n.isSensor)for(s=n.activeContacts,a=(o=n.collision).parentA,h=o.parentB,l=o.normal,u=o.tangent,i=0;i<s.length;i++)d=(c=s[i]).vertex,f=c.normalImpulse,p=c.tangentImpulse,0===f&&0===p||(v.x=l.x*f+u.x*p,v.y=l.y*f+u.y*p,a.isStatic||a.isSleeping||(g=r.sub(d,a.position,y),a.positionPrev.x+=v.x*a.inverseMass,a.positionPrev.y+=v.y*a.inverseMass,a.anglePrev+=r.cross(g,v)*a.inverseInertia),h.isStatic||h.isSleeping||(g=r.sub(d,h.position,y),h.positionPrev.x-=v.x*h.inverseMass,h.positionPrev.y-=v.y*h.inverseMass,h.anglePrev-=r.cross(g,v)*h.inverseInertia))},n.solveVelocity=function(t,e){for(var i=e*e,s=r._temp[0],a=r._temp[1],h=r._temp[2],l=r._temp[3],u=r._temp[4],c=r._temp[5],d=0;d<t.length;d++){var f=t[d];if(f.isActive&&!f.isSensor){var p=f.collision,g=p.parentA,v=p.parentB,y=p.normal,m=p.tangent,x=f.activeContacts,T=1/x.length;g.velocity.x=g.position.x-g.positionPrev.x,g.velocity.y=g.position.y-g.positionPrev.y,v.velocity.x=v.position.x-v.positionPrev.x,v.velocity.y=v.position.y-v.positionPrev.y,g.angularVelocity=g.angle-g.anglePrev,v.angularVelocity=v.angle-v.anglePrev;for(var w=0;w<x.length;w++){var b=x[w],S=b.vertex,_=r.sub(S,g.position,a),A=r.sub(S,v.position,h),E=r.add(g.velocity,r.mult(r.perp(_),g.angularVelocity),l),C=r.add(v.velocity,r.mult(r.perp(A),v.angularVelocity),u),M=r.sub(E,C,c),P=r.dot(y,M),O=r.dot(m,M),R=Math.abs(O),L=o.sign(O),D=(1+f.restitution)*P,F=o.clamp(f.separation+P,0,1)*n._frictionNormalMultiplier,k=O,I=1/0;R>f.friction*f.frictionStatic*F*i&&(I=R,k=o.clamp(f.friction*L*i,-I,I));var B=r.cross(_,y),Y=r.cross(A,y),N=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*Y*Y);if(D*=N,k*=N,P<0&&P*P>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+D,0),D=b.normalImpulse-X}if(O*O>n._restingThreshTangent*i)b.tangentImpulse=0;else{var z=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+k,-I,I),k=b.tangentImpulse-z}s.x=y.x*D+m.x*k,s.y=y.y*D+m.y*k,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(_,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(A,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(451),r=i(36);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a<h.length;a++)h[a].confirmedActive=!1;for(a=0;a<e.length;a++)(n=e[a]).collided&&((o=l[r=s.id(n.bodyA,n.bodyB)])?(o.isActive?d.push(o):u.push(o),s.update(o,n,i),o.confirmedActive=!0):(o=s.create(n,i),l[r]=o,u.push(o),h.push(o)));for(a=0;a<h.length;a++)(o=h[a]).isActive&&!o.confirmedActive&&(s.setActive(o,!1,i),c.push(o))},n.removeOld=function(t,e){var i,s,r,o,a=t.list,h=t.table,l=[];for(o=0;o<a.length;o++)(s=(i=a[o]).collision).bodyA.isSleeping||s.bodyB.isSleeping?i.timeUpdated=e:e-i.timeUpdated>n._pairMaxIdleLife&&l.push(o);for(o=0;o<l.length;o++)delete h[(i=a[r=l[o]-o]).id],a.splice(r,1)},n.clear=function(t){return t.table={},t.list.length=0,t.collisionStart.length=0,t.collisionActive.length=0,t.collisionEnd.length=0,t}},function(t,e,i){var n={};t.exports=n;var s=i(451),r=i(543),o=i(36);n.create=function(t){var e={controller:n,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,s){var r,o,a,h,l,u=i.world,c=t.buckets,d=!1,f=i.metrics;for(f.broadphaseTests=0,r=0;r<e.length;r++){var p=e[r];if((!p.isSleeping||s)&&!(p.bounds.max.x<u.bounds.min.x||p.bounds.min.x>u.bounds.max.x||p.bounds.max.y<u.bounds.min.y||p.bounds.min.y>u.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var y=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,m=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!y&&m&&m&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||y&&!m||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n<e.length;n++){var r=e[n];if(!(i.id===r.id||i.isStatic&&r.isStatic)){var o=s.id(i,r),a=t.pairs[o];a?a[2]+=1:t.pairs[o]=[i,r,1]}}e.push(i)},n._bucketRemoveBody=function(t,e,i){e.splice(o.indexOf(e,i),1);for(var n=0;n<e.length;n++){var r=e[n],a=s.id(i,r),h=t.pairs[a];h&&(h[2]-=1)}},n._createActivePairsList=function(t){var e,i,n=[];e=o.keys(t.pairs);for(var s=0;s<e.length;s++)(i=t.pairs[e[s]])[2]>0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(540),r=i(36);n.name="matter-js",n.version="0.14.2",n.uses=[],n.used=[],n.use=function(){s.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(n,t,e)}},function(t,e,i){var n=i(460),s=i(0),r=i(452),o=i(18),a=i(2),h=i(200),l=i(67),u=i(3),c=new s({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,s,r,h){o.call(this,t.scene,"Sprite"),this.anims=new n(this),this.setTexture(s,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=c},function(t,e,i){var n=i(0),s=i(452),r=i(18),o=i(2),a=i(93),h=i(200),l=i(3),u=new n({Extends:a,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity,h],initialize:function(t,e,i,n,s,a){r.call(this,t.scene,"Image"),this.setTexture(n,s),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(149),r=i(209),o=i(36),a=i(72),h=i(138);n.stack=function(t,e,i,n,r,o,h){for(var l,u=s.create({label:"Stack"}),c=t,d=e,f=0,p=0;p<n;p++){for(var g=0,v=0;v<i;v++){var y=h(c,d,v,p,l,f);if(y){var m=y.bounds.max.y-y.bounds.min.y,x=y.bounds.max.x-y.bounds.min.x;m>g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u<l.length;u++){var c=l[u-1],d=l[u],f=c.bounds.max.y-c.bounds.min.y,p=c.bounds.max.x-c.bounds.min.x,g=d.bounds.max.y-d.bounds.min.y,v={bodyA:c,pointA:{x:p*e,y:f*i},bodyB:d,pointB:{x:(d.bounds.max.x-d.bounds.min.x)*n,y:g*a}},y=o.extend(v,h);s.addConstraint(t,r.create(y))}return t.label+=" Chain",t},n.mesh=function(t,e,i,n,a){var h,l,u,c,d,f=t.bodies;for(h=0;h<i;h++){for(l=1;l<e;l++)u=f[l-1+h*e],c=f[l+h*e],s.addConstraint(t,r.create(o.extend({bodyA:u,bodyB:c},a)));if(h>0)for(l=0;l<e;l++)u=f[l+(h-1)*e],c=f[l+h*e],s.addConstraint(t,r.create(o.extend({bodyA:u,bodyB:c},a))),n&&l>0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&l<e-1&&(d=f[l+1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a))))}return t.label+=" Mesh",t},n.pyramid=function(t,e,i,s,r,o,h){return n.stack(t,e,i,s,r,o,function(e,n,o,l,u,c){var d=Math.min(s,Math.ceil(i/2)),f=u?u.bounds.max.x-u.bounds.min.x:0;if(!(l>d||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l<i;l++){var u=h.circle(t+l*(1.9*n),e+o,n,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),c=r.create({pointA:{x:t+l*(1.9*n),y:e},bodyB:u});s.addBody(a,u),s.addConstraint(a,c)}return a},n.car=function(t,e,i,n,o){var l=a.nextGroup(!0),u=.5*-i+20,c=.5*i-20,d=s.create({label:"Car"}),f=h.rectangle(t,e,i,n,{collisionFilter:{group:l},chamfer:{radius:.5*n},density:2e-4}),p=h.circle(t+u,e+0,o,{collisionFilter:{group:l},friction:.8}),g=h.circle(t+c,e+0,o,{collisionFilter:{group:l},friction:.8}),v=r.create({bodyB:f,pointB:{x:u,y:0},bodyA:p,stiffness:1,length:0}),y=r.create({bodyB:f,pointB:{x:c,y:0},bodyA:g,stiffness:1,length:0});return s.addBody(d,f),s.addBody(d,p),s.addBody(d,g),s.addConstraint(d,v),s.addConstraint(d,y),d},n.softBody=function(t,e,i,s,r,a,l,u,c,d){c=o.extend({inertia:1/0},c),d=o.extend({stiffness:.2,render:{type:"line",anchors:!1}},d);var f=n.stack(t,e,i,s,r,a,function(t,e){return h.circle(t,e,u,c)});return n.mesh(f,i,s,l,d),f.label="Soft Body",f}},function(t,e){function i(t,e,i){i=i||0;var n,s,r,o,a,h,l,u=[0,0];return n=t[1][1]-t[0][1],s=t[0][0]-t[1][0],r=n*t[0][0]+s*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],b(l=n*a-o*s,0,i)||(u[0]=(a*r-s*h)/l,u[1]=(n*h-o*r)/l),u}function n(t,e,i,n){var s=e[0]-t[0],r=e[1]-t[1],o=n[0]-i[0],a=n[1]-i[1];if(o*r-a*s==0)return!1;var h=(s*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*s),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*s-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a<e.length;++a)if(g(e,a))for(var h=0;h<e.length;++h)if(m(e,a,h)){n=t(T(e,a,h,r)),s=t(T(e,h,a,r));for(var l=0;l<s.length;l++)n.push(s[l]);n.length<o&&(i=n,o=n.length,i.push([f(e,a),f(e,h)]))}return i}(t);return e.length>0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;s<i.length;s++)for(var r=i[s],o=0;o<n.length;o++){var a=n[o],h=t(a,r);if(h){n.splice(o,1),n.push(h[0],h[1]);break}}return n}var r=i,s=e.indexOf(r[0]),o=e.indexOf(r[1]);return-1!==s&&-1!==o&&[T(e,s,o),T(e,o,s)]}(t,e):[t]},quickDecomp:function t(e,i,n,s,l,u,c){u=u||100;c=c||0;l=l||25;i=void 0!==i?i:[];n=n||[];s=s||[];var v=[0,0],y=[0,0],m=[0,0];var T=0,b=0,S=0,_=0;var A=0,E=0,C=0;var M=[],P=[];var O=e,R=e;if(R.length<3)return i;c++;if(c>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;L<e.length;++L)if(g(O,L)){n.push(O[L]),T=b=Number.MAX_VALUE;for(var D=0;D<e.length;++D)r(f(O,L-1),f(O,L),f(O,D))&&h(f(O,L-1),f(O,L),f(O,D-1))&&(m=w(f(O,L-1),f(O,L),f(O,D),f(O,D-1)),a(f(O,L+1),f(O,L),m)&&(S=d(O[L],m))<b&&(b=S,y=m,E=D)),r(f(O,L+1),f(O,L),f(O,D+1))&&h(f(O,L+1),f(O,L),f(O,D))&&(m=w(f(O,L+1),f(O,L),f(O,D),f(O,D+1)),r(f(O,L-1),f(O,L),m)&&(S=d(O[L],m))<T&&(T=S,v=m,A=D));if(E===(A+1)%e.length)m[0]=(y[0]+v[0])/2,m[1]=(y[1]+v[1])/2,s.push(m),L<A?(p(M,O,L,A+1),M.push(m),P.push(m),0!==E&&p(P,O,E,O.length),p(P,O,0,L+1)):(0!==L&&p(M,O,L,O.length),p(M,O,0,A+1),M.push(m),P.push(m),p(P,O,E,L+1));else{if(E>A&&(A+=e.length),_=Number.MAX_VALUE,A<E)return i;for(var D=E;D<=A;++D)o(f(O,L-1),f(O,L),f(O,D))&&h(f(O,L+1),f(O,L),f(O,D))&&(S=d(f(O,L),f(O,D)))<_&&x(O,L,D)&&(_=S,C=D%e.length);L<C?(p(M,O,L,C+1),0!==C&&p(P,O,C,R.length),p(P,O,0,L+1)):(0!==L&&p(M,O,L,R.length),p(M,O,0,C+1),p(P,O,C,L+1))}return M.length<P.length?(t(M,i,n,s,l,u,c),t(P,i,n,s,l,u,c)):(t(P,i,n,s,l,u,c),t(M,i,n,s,l,u,c)),i}i.push(e);return i},isSimple:function(t){var e,i=t;for(e=0;e<i.length-1;e++)for(var s=0;s<e-1;s++)if(n(i[e],i[e+1],i[s],i[s+1]))return!1;for(e=1;e<i.length-2;e++)if(n(i[0],i[i.length-1],i[e],i[e+1]))return!1;return!0},removeCollinearPoints:function(t,e){for(var i=0,n=t.length-1;t.length>3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)S(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;n<t.length;++n)(i[n][1]<i[e][1]||i[n][1]===i[e][1]&&i[n][0]>i[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))<n}return 0===s(t,e,i)}function d(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function f(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function p(t,e,i,n){for(var s=i;s<n;s++)t.push(e[s])}function g(t,e){return a(f(t,e-1),f(t,e),f(t,e+1))}var v=[],y=[];function m(t,e,n){var s,r,a=v,l=y;if(o(f(t,e+1),f(t,e),f(t,n))&&h(f(t,e-1),f(t,e),f(t,n)))return!1;r=d(f(t,e),f(t,n));for(var u=0;u!==t.length;++u)if((u+1)%t.length!==e&&u!==e&&o(f(t,e),f(t,n),f(t,u+1))&&h(f(t,e),f(t,n),f(t,u))&&(a[0]=f(t,e),a[1]=f(t,n),l[0]=f(t,u),l[1]=f(t,u+1),s=i(a,l),d(f(t,e),s)<r))return!1;return!0}function x(t,e,i){for(var s=0;s!==t.length;++s)if(s!==e&&s!==i&&(s+1)%t.length!==e&&(s+1)%t.length!==i&&n(f(t,e),f(t,i),f(t,s),f(t,s+1)))return!1;return!0}function T(t,e,i,n){var s=n||[];if(function(t){t.length=0}(s),e<i)for(var r=e;r<=i;r++)s.push(t[r]);else{for(r=0;r<=i;r++)s.push(t[r]);for(r=e;r<t.length;r++)s.push(t[r])}return s}function w(t,e,i,n,s){s=s||0;var r=e[1]-t[1],o=t[0]-e[0],a=r*t[0]+o*t[1],h=n[1]-i[1],l=i[0]-n[0],u=h*i[0]+l*i[1],c=r*l-h*o;return b(c,0,s)?[0,0]:[(l*a-o*u)/c,(r*u-h*a)/c]}function b(t,e,i){return i=i||0,Math.abs(t-e)<=i}function S(t,e,i){return b(t[0],e[0],i)&&b(t[1],e[1],i)}},function(t,e,i){var n=i(138),s=i(0),r=i(1289),o=i(209),a=i(1334),h=i(1288),l=i(1287),u=i(544),c=i(1311),d=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return this.world.add(o),o},trapezoid:function(t,e,i,s,r,o){var a=n.trapezoid(t,e,i,s,r,o);return this.world.add(a),a},circle:function(t,e,i,s,r){var o=n.circle(t,e,i,s,r);return this.world.add(o),o},polygon:function(t,e,i,s,r){var o=n.polygon(t,e,i,s,r);return this.world.add(o),o},fromVertices:function(t,e,i,s,r,o,a){var h=n.fromVertices(t,e,i,s,r,o,a);return this.world.add(h),h},imageStack:function(t,e,i,n,s,o,a,l,u){void 0===a&&(a=0),void 0===l&&(l=0),void 0===u&&(u={});var c=this.world,d=this.sys.displayList;u.addToWorld=!1;var f=r.stack(i,n,s,o,a,l,function(i,n){var s=new h(c,i,n,t,e,u);return d.add(s),s.body});return c.add(f),f},stack:function(t,e,i,n,s,o,a){var h=r.stack(t,e,i,n,s,o,a);return this.world.add(h),h},pyramid:function(t,e,i,n,s,o,a){var h=r.pyramid(t,e,i,n,s,o,a);return this.world.add(h),h},chain:function(t,e,i,n,s,o){return r.chain(t,e,i,n,s,o)},mesh:function(t,e,i,n,s){return r.mesh(t,e,i,n,s)},newtonsCradle:function(t,e,i,n,s){var o=r.newtonsCradle(t,e,i,n,s);return this.world.add(o),o},car:function(t,e,i,n,s){var o=r.car(t,e,i,n,s);return this.world.add(o),o},softBody:function(t,e,i,n,s,o,a,h,l,u){var c=r.softBody(t,e,i,n,s,o,a,h,l,u);return this.world.add(c),c},joint:function(t,e,i,n,s){return this.constraint(t,e,i,n,s)},spring:function(t,e,i,n,s){return this.constraint(t,e,i,n,s)},constraint:function(t,e,i,n,s){void 0===n&&(n=1),void 0===s&&(s={}),s.bodyA="body"===t.type?t:t.body,s.bodyB="body"===e.type?e:e.body,s.length=i,s.stiffness=n;var r=o.create(s);return this.world.add(r),r},worldConstraint:function(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n={}),n.bodyB="body"===t.type?t:t.body,n.length=e,n.stiffness=i;var s=o.create(n);return this.world.add(s),s},mouseSpring:function(t){return this.pointerConstraint(t)},pointerConstraint:function(t){void 0===t&&(t={}),t.hasOwnProperty("render")||(t.render={visible:!1});var e=new c(this.scene,this.world,t);return this.world.add(e.constraint),e},image:function(t,e,i,n,s){var r=new h(this.world,t,e,i,n,s);return this.sys.displayList.add(r),r},tileBody:function(t,e){return new u(this.world,t,e)},sprite:function(t,e,i,n,s){var r=new l(this.world,t,e,i,n,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),r},gameObject:function(t,e){return a(this.world,t,e)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=d},function(t,e,i){var n=i(1298),s=i(0),r=i(240),o=i(1297),a=i(11),h=i(548),l=i(2),u=i(91),c=i(102),d=i(1338),f=i(31),p=i(239),g=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new c,this.gravity=l(e,"gravity",0),this.cellSize=l(e,"cellSize",64),this.collisionMap=new o,this.timeScale=l(e,"timeScale",1),this.maxStep=l(e,"maxStep",.05),this.enabled=!0,this.drawDebug=l(e,"debug",!1),this.debugGraphic;var i=l(e,"maxVelocity",100);if(this.defaults={debugShowBody:l(e,"debugShowBody",!0),debugShowVelocity:l(e,"debugShowVelocity",!0),bodyDebugColor:l(e,"debugBodyColor",16711935),velocityDebugColor:l(e,"debugVelocityColor",65280),maxVelocityX:l(e,"maxVelocityX",i),maxVelocityY:l(e,"maxVelocityY",i),minBounceVelocity:l(e,"minBounceVelocity",40),gravityFactor:l(e,"gravityFactor",1),bounciness:l(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,l(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=l(n,"x",0),r=l(n,"y",0),h=l(n,"width",t.sys.scale.width),u=l(n,"height",t.sys.scale.height),d=l(n,"thickness",64),f=l(n,"left",!0),p=l(n,"right",!0),g=l(n,"top",!0),v=l(n,"bottom",!0);this.setBounds(s,r,h,u,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==f.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;r<s.length;r++)if("collision"===s[r].name){n=s[r];break}void 0===e&&(e=n.tilesize),this.collisionMap=new o(e,n.data)}else Array.isArray(t)?this.collisionMap=new o(e,t):console.warn("Invalid Weltmeister collision map data: "+t);return this.collisionMap},setCollisionMapFromTilemapLayer:function(t,e){void 0===e&&(e={});for(var i=l(e,"slopeProperty",null),n=l(e,"slopeMap",null),s=l(e,"defaultCollidingSlope",null),r=l(e,"defaultNonCollidingSlope",0),a=t.layer,h=a.baseTileWidth,c=[],d=0;d<a.height;d++){c[d]=[];for(var f=0;f<a.width;f++){var p=a.data[d][f];p&&p.collides?null!==i&&u(p.properties,i)?c[d][f]=parseInt(p.properties[i],10):null!==n&&u(n,p.index)?c[d][f]=n[p.index]:c[d][f]=null!==s?s:p.index:c[d][f]=r}}return this.collisionMap=new o(h,c),this.collisionMap},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,o){var a=this.walls[e];t?a?a.resetSize(i,n,s,o):(this.walls[e]=this.create(i,n,s,o),this.walls[e].name=e,this.walls[e].gravityFactor=0,this.walls[e].collides=r.FIXED):(a&&this.bodies.remove(a),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},getNextID:function(){return this._lastId++},create:function(t,e,i,s){var r=new n(this,t,e,i,s);return this.bodies.set(r),r},remove:function(t){this.bodies.delete(t)},pause:function(){return this.enabled=!1,this.emit(h.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(h.RESUME),this},update:function(t,e){if(this.enabled&&0!==this.bodies.size){var i,n,s=Math.min(e/1e3,this.maxStep)*this.timeScale;this.delta=s;var r=this.bodies.entries,o=r.length,a={},h=this.cellSize;for(i=0;i<o;i++)(n=r[i]).enabled&&n.update(s);for(i=0;i<o;i++)(n=r[i])&&!n.skipHash()&&this.checkHash(n,a,h);if(this.drawDebug){var l=this.debugGraphic;for(l.clear(),i=0;i<o;i++)(n=r[i])&&n.willDrawDebug()&&n.drawDebug(l)}}},checkHash:function(t,e,i){for(var n={},s=Math.floor(t.pos.x/i),r=Math.floor(t.pos.y/i),o=Math.floor((t.pos.x+t.size.x)/i)+1,a=Math.floor((t.pos.y+t.size.y)/i)+1,h=s;h<o;h++)for(var l=r;l<a;l++)if(e[h])if(e[h][l]){for(var u=e[h][l],c=0;c<u.length;c++)t.touches(u[c])&&!n[u[c].id]&&(n[u[c].id]=!0,this.checkBodies(t,u[c]));u.push(t)}else e[h][l]=[t];else e[h]={},e[h][l]=[t]},checkBodies:function(t,e){t.collides===r.FIXED&&e.collides===r.FIXED||(t.checkAgainst&e.type&&t.check(e),e.checkAgainst&t.type&&e.check(t),t.collides&&e.collides&&t.collides+e.collides>r.ACTIVE&&d(this,t,e))},setCollidesNever:function(t){for(var e=0;e<t.length;e++)t[e].collides=r.NEVER;return this},setLite:function(t){for(var e=0;e<t.length;e++)t[e].collides=r.LITE;return this},setPassive:function(t){for(var e=0;e<t.length;e++)t[e].collides=r.PASSIVE;return this},setActive:function(t){for(var e=0;e<t.length;e++)t[e].collides=r.ACTIVE;return this},setFixed:function(t){for(var e=0;e<t.length;e++)t[e].collides=r.FIXED;return this},setTypeNone:function(t){for(var e=0;e<t.length;e++)t[e].type=p.NONE;return this},setTypeA:function(t){for(var e=0;e<t.length;e++)t[e].type=p.A;return this},setTypeB:function(t){for(var e=0;e<t.length;e++)t[e].type=p.B;return this},setAvsB:function(t){for(var e=0;e<t.length;e++)t[e].type=p.A,t[e].checkAgainst=p.B;return this},setBvsA:function(t){for(var e=0;e<t.length;e++)t[e].type=p.B,t[e].checkAgainst=p.A;return this},setCheckAgainstNone:function(t){for(var e=0;e<t.length;e++)t[e].checkAgainst=p.NONE;return this},setCheckAgainstA:function(t){for(var e=0;e<t.length;e++)t[e].checkAgainst=p.A;return this},setCheckAgainstB:function(t){for(var e=0;e<t.length;e++)t[e].checkAgainst=p.B;return this},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners(),this.scene=null,this.bodies.clear(),this.bodies=null,this.collisionMap=null}});t.exports=g},function(t,e,i){var n=i(0),s=i(547),r=i(67),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(547),r=i(93),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(547),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(1295),r=i(1294),o=i(1293),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1352),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u<a&&(h||l)&&(this.step(o,t,e,h,l,s,r,i,n,u),t=o.pos.x,e=o.pos.y,o.collision.x&&(h=0,i=0),o.collision.y&&(l=0,n=0),!o.collision.slope);u++);else this.step(o,t,e,i,n,s,r,i,n,0);return o},step:function(t,e,i,n,s,r,o,a,h,l){var u,c,d=0,f=this.tilesize,p=this.width,g=this.height;if(n){var v=n>0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var T=Math.floor((e+v)/f);if((l>0||u===T||T<0||T>=p)&&(T=-1),u>=0&&u<p)for(c=m;c<x&&!(-1!==T&&(d=this.data[c][T])>1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,T,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,b=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),_=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var A=Math.floor((i+w)/f);if((l>0||c===A||A<0||A>=g)&&(A=-1),c>=0&&c<g)for(u=S;u<_&&!(-1!==A&&(d=this.data[A][u])>1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,A));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+b;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),T=g/x,w=-p/x,b=y*T+m*w,S=T*b,_=w*b;return S*S+_*_>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-_,t.collision.slope={x:p,y:g,nx:T,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(240),r=i(1357),o=i(239),a=i(1356),h=new n({initialize:function(t,e,i,n,r){void 0===n&&(n=16),void 0===r&&(r=n),this.world=t,this.gameObject=null,this.enabled=!0,this.parent,this.id=t.getNextID(),this.name="",this.size={x:n,y:r},this.offset={x:0,y:0},this.pos={x:e,y:i},this.last={x:e,y:i},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:t.defaults.maxVelocityX,y:t.defaults.maxVelocityY},this.standing=!1,this.gravityFactor=t.defaults.gravityFactor,this.bounciness=t.defaults.bounciness,this.minBounceVelocity=t.defaults.minBounceVelocity,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=o.NONE,this.checkAgainst=o.NONE,this.collides=s.NEVER,this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.updateCallback,this.slopeStanding={min:.767944870877505,max:2.3736477827122884}},reset:function(t,e){this.pos={x:t,y:e},this.last={x:t,y:e},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:100,y:100},this.standing=!1,this.gravityFactor=1,this.bounciness=0,this.minBounceVelocity=40,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=o.NONE,this.checkAgainst=o.NONE,this.collides=s.NEVER},update:function(t){var e=this.pos;this.last.x=e.x,this.last.y=e.y,this.vel.y+=this.world.gravity*t*this.gravityFactor,this.vel.x=r(t,this.vel.x,this.accel.x,this.friction.x,this.maxVel.x),this.vel.y=r(t,this.vel.y,this.accel.y,this.friction.y,this.maxVel.y);var i=this.vel.x*t,n=this.vel.y*t,s=this.world.collisionMap.trace(e.x,e.y,i,n,this.size.x,this.size.y);this.handleMovementTrace(s)&&a(this,s);var o=this.gameObject;o&&(o.x=e.x-this.offset.x+o.displayOriginX*o.scaleX,o.y=e.y-this.offset.y+o.displayOriginY*o.scaleY),this.updateCallback&&this.updateCallback(this)},drawDebug:function(t){var e=this.pos;if(this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.size.x,this.size.y)),this.debugShowVelocity){var i=e.x+this.size.x/2,n=e.y+this.size.y/2;t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.vel.x,n+this.vel.y)}},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},skipHash:function(){return!this.enabled||0===this.type&&0===this.checkAgainst&&0===this.collides},touches:function(t){return!(this.pos.x>=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},,function(t,e,i){t.exports={BitmapMaskPipeline:i(454),ForwardDiffuseLightPipeline:i(453),TextureTintPipeline:i(211)}},function(t,e,i){t.exports={Utils:i(9),WebGLPipeline:i(212),WebGLRenderer:i(456),Pipelines:i(1300),BYTE:0,SHORT:1,UNSIGNED_BYTE:2,UNSIGNED_SHORT:3,FLOAT:4}},function(t,e,i){t.exports={Canvas:i(458),WebGL:i(455)}},function(t,e,i){t.exports={CanvasRenderer:i(459),GetBlendModes:i(457),SetTransform:i(25)}},function(t,e,i){t.exports={Canvas:i(1303),Snapshot:i(1302),WebGL:i(1301)}},function(t,e,i){var n=i(541),s={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.13.1",silent:!0,install:function(t){t.after("Engine.update",function(){s.Engine.update(this)})},Engine:{update:function(t){for(var e=t.world,i=n.Composite.allBodies(e),r=n.Composite.allComposites(e),o=0;o<i.length;o+=1){var a=i[o];a.plugin.wrap&&s.Body.wrap(a,a.plugin.wrap)}for(o=0;o<r.length;o+=1){var h=r[o];h.plugin.wrap&&s.Composite.wrap(h,h.plugin.wrap)}}},Bounds:{wrap:function(t,e){var i=null,n=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?i=e.min.x-t.max.x:t.max.x<e.min.x&&(i=e.max.x-t.min.x)),void 0!==e.min.y&&void 0!==e.max.y&&(t.min.y>e.max.y?n=e.min.y-t.max.y:t.max.y<e.min.y&&(n=e.max.y-t.min.y)),null!==i||null!==n)return{x:i||0,y:n||0}}},Body:{wrap:function(t,e){var i=s.Bounds.wrap(t.bounds,e);return i&&n.Body.translate(t,i),i}},Composite:{bounds:function(t){for(var e=n.Composite.allBodies(t),i=[],s=0;s<e.length;s+=1){var r=e[s];i.push(r.bounds.min,r.bounds.max)}return n.Bounds.create(i)},wrap:function(t,e){var i=s.Bounds.wrap(s.Composite.bounds(t),e);return i&&n.Composite.translate(t,i),i}}};t.exports=s},function(t,e,i){var n=i(541),s={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.13.1",silent:!0,install:function(t){t.after("Body.create",function(){s.Body.init(this)}),t.before("Engine.update",function(t){s.Engine.update(t)})},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=t.world,i=n.Composite.allBodies(e),s=0;s<i.length;s+=1){var r=i[s],o=r.plugin.attractors;if(o&&o.length>0)for(var a=s+1;a<i.length;a+=1)for(var h=i[a],l=0;l<o.length;l+=1){var u=o[l],c=u;n.Common.isFunction(u)&&(c=u(r,h)),c&&n.Body.applyForce(h,h.position,c)}}}},Attractors:{gravityConstant:.001,gravity:function(t,e){var i=n.Vector.sub(e.position,t.position),r=n.Vector.magnitudeSquared(i)||1e-4,o=n.Vector.normalise(i),a=-s.Attractors.gravityConstant*(t.mass*e.mass/r),h=n.Vector.mult(o,a);n.Body.applyForce(t,t.position,n.Vector.neg(h)),n.Body.applyForce(e,e.position,h)}}};t.exports=s},function(t,e,i){var n=i(0),s=i(1291),r=i(2),o=i(4),a=i(1306),h=i(1286),l=i(1305),u=i(103),c=i(540),d=i(17),f=i(16),p=i(1281),g=i(82),v=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.verts=g,o(this.config,"plugins.attractors",!1)&&(c.register(a),c.use(h,a)),o(this.config,"plugins.wrap",!1)&&(c.register(l),c.use(h,l)),t.sys.events.once(f.BOOT,this.boot,this),t.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new p(this.scene,this.config),this.add=new s(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new p(this.scene,this.config),this.add=new s(this.world));var t=this.systems.events;t.on(f.UPDATE,this.world.update,this.world),t.on(f.POST_UPDATE,this.world.postUpdate,this.world),t.once(f.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return u(r(e,"matter",{}),r(t,"matter",{}))},enableAttractorPlugin:function(){return c.register(a),c.use(h,a),this},enableWrapPlugin:function(){return c.register(l),c.use(h,l),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},shutdown:function(){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("MatterPhysics",v,"matterPhysics"),t.exports=v},function(t,e,i){var n={};t.exports=n;i(86);var s=i(36);n.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||s.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,r,o,a,h,l,u,c,d,f,p,g=[],v=0,y=0,m=0;e=e||15;var x=function(t,e,i){var n=i%2==1&&i>1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),y=f+t,m=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":y=t.x,m=t.y;break;case"H":y=t.x;break;case"V":m=t.y}x(y,m,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i<t.pathSegList.numberOfItems;i+=1)l.push(t.pathSegList.getItem(i));for(u=l.concat();v<o;){if((h=l[t.getPathSegAtLength(v)])!=c){for(;u.length&&u[0]!=h;)T(u.shift());c=h}switch(h.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":a=t.getPointAtLength(v),x(a.x,a.y,0)}v+=e}for(i=0,r=u.length;i<r;++i)T(u[i]);return g},n._svgPathToAbsolute=function(t){for(var e,i,n,s,r,o,a=t.pathSegList,h=0,l=0,u=a.numberOfItems,c=0;c<u;++c){var d=a.getItem(c),f=d.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(f))"x"in d&&(h=d.x),"y"in d&&(l=d.y);else switch("x1"in d&&(n=h+d.x1),"x2"in d&&(r=h+d.x2),"y1"in d&&(s=l+d.y1),"y2"in d&&(o=l+d.y2),"x"in d&&(h+=d.x),"y"in d&&(l+=d.y),f){case"m":a.replaceItem(t.createSVGPathSegMovetoAbs(h,l),c);break;case"l":a.replaceItem(t.createSVGPathSegLinetoAbs(h,l),c);break;case"h":a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h),c);break;case"v":a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(l),c);break;case"c":a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h,l,n,s,r,o),c);break;case"s":a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h,l,r,o),c);break;case"q":a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h,l,n,s),c);break;case"t":a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h,l),c);break;case"a":a.replaceItem(t.createSVGPathSegArcAbs(h,l,d.r1,d.r2,d.angle,d.largeArcFlag,d.sweepFlag),c);break;case"z":case"Z":h=e,l=i}"M"!=f&&"m"!=f||(e=h,i=l)}}},function(t,e,i){var n={};t.exports=n;var s=i(149),r=i(36);n.create=function(t){return r.extend({extended:!1,narrowDetections:0,narrowphaseTests:0,narrowReuse:0,narrowReuseCount:0,midphaseTests:0,broadphaseTests:0,narrowEff:1e-4,midEff:1e-4,broadEff:1e-4,collisions:0,buckets:0,bodies:0,pairs:0},!1,t)},n.reset=function(t){t.extended&&(t.narrowDetections=0,t.narrowphaseTests=0,t.narrowReuse=0,t.narrowReuseCount=0,t.midphaseTests=0,t.broadphaseTests=0,t.narrowEff=0,t.midEff=0,t.broadEff=0,t.collisions=0,t.buckets=0,t.pairs=0,t.bodies=0)},n.update=function(t,e){if(t.extended){var i=e.world,n=s.allBodies(i);t.collisions=t.narrowDetections,t.pairs=e.pairs.list.length,t.bodies=n.length,t.midEff=(t.narrowDetections/(t.midphaseTests||1)).toFixed(2),t.narrowEff=(t.narrowDetections/(t.narrowphaseTests||1)).toFixed(2),t.broadEff=(1-t.broadphaseTests/(n.length||1)).toFixed(2),t.narrowReuse=(t.narrowReuseCount/(t.narrowphaseTests||1)).toFixed(2)}}},function(t,e,i){var n={};t.exports=n;var s=i(87),r=i(542),o=i(86),a=i(138),h=i(82);n.collides=function(t,e){for(var i=[],n=0;n<e.length;n++){var s=e[n];if(o.overlaps(s.bounds,t.bounds))for(var a=1===s.parts.length?0:1;a<s.parts.length;a++){var h=s.parts[a];if(o.overlaps(h.bounds,t.bounds)){var l=r.collides(h,t);if(l.collided){i.push(l);break}}}}return i},n.ray=function(t,e,i,r){r=r||1e-100;for(var o=s.angle(e,i),h=s.magnitude(s.sub(e,i)),l=.5*(i.x+e.x),u=.5*(i.y+e.y),c=a.rectangle(l,u,h,r,{angle:o}),d=n.collides(c,t),f=0;f<d.length;f+=1){var p=d[f];p.body=p.bodyB=p.bodyA}return d},n.region=function(t,e,i){for(var n=[],s=0;s<t.length;s++){var r=t[s],a=o.overlaps(r.bounds,e);(a&&!i||!a&&i)&&n.push(r)}return n},n.point=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n];if(o.contains(s.bounds,e))for(var r=1===s.parts.length?0:1;r<s.parts.length;r++){var a=s.parts[r];if(o.contains(a.bounds,e)&&h.contains(a.vertices,e)){i.push(s);break}}}return i}},function(t,e,i){var n=i(86),s=i(0),r=i(149),o=i(209),a=i(543),h=i(545),l=i(2),u=i(52),c=i(103),d=i(238),f=i(3),p=i(82),g=new s({initialize:function(t,e,i){void 0===i&&(i={});this.scene=t,this.world=e;var n=l(i,"camera",null);n?(this.camera=n,delete i.camera):this.camera=t.sys.cameras.main,this.pointer=null,this.active=!0,this.position=new f,this.constraint=o.create(c(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},damping:0,length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(u.POINTER_DOWN,this.onDown,this),t.sys.input.on(u.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer=t},onUp:function(){this.pointer=null},getBodyPart:function(t,e){for(var i=this.constraint,n=t.parts.length>1?1:0;n<t.parts.length;n++){var s=t.parts[n];if(p.contains(s.vertices,e))return i.bodyB=t,i.pointA.x=e.x,i.pointA.y=e.y,i.pointB.x=e.x-t.position.x,i.pointB.y=e.y-t.position.y,i.angleB=t.angle,d.set(t,!1),!0}return!1},update:function(){if(this.active){var t=this.pointer,e=this.constraint;if(t){var i=this.position;if(this.camera.getWorldPoint(t.x,t.y,i),e.bodyB)d.set(e.bodyB,!1),e.pointA.x=i.x,e.pointA.y=i.y;else for(var s=r.allBodies(this.world.localWorld),o=0;o<s.length;o++){var h=s[o];if(!h.ignorePointer&&n.contains(h.bounds,i)&&a.canCollide(h.collisionFilter,e.collisionFilter)&&this.getBodyPart(h,i))break}}else e.bodyB&&(e.bodyB=null)}},destroy:function(){this.world.removeConstraint(this.constraint),this.constraint=null,this.world.off(h.BEFORE_UPDATE,this.update),this.scene.sys.input.off(u.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(u.POINTER_UP,this.onUp,this)}});t.exports=g},function(t,e,i){var n=i(72),s={setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),n.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),n.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),n.setVelocity(this.body,this._tempVec2),this}};t.exports=s},function(t,e,i){var n=i(72),s=i(20),r=i(214),o=i(213),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),n.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),n.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),n.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),n.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),n.setAngle(this.body,t),this},setFixedRotation:function(){return n.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,n.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var s=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,n.scale(this.body,s,r,i),n.scale(this.body,t,e,i),this}};t.exports=a},function(t,e){t.exports="sleepstart"},function(t,e){t.exports="sleepend"},function(t,e){t.exports="resume"},function(t,e){t.exports="pause"},function(t,e){t.exports="collisionstart"},function(t,e){t.exports="collisionend"},function(t,e){t.exports="collisionactive"},function(t,e){t.exports="beforeupdate"},function(t,e){t.exports="afterupdate"},function(t,e,i){var n=i(545),s=i(210),r={setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;s.on(this.body,"sleepStart",function(t){e.emit(n.SLEEP_START,t,this)})}else s.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;s.on(this.body,"sleepEnd",function(t){e.emit(n.SLEEP_END,t,this)})}else s.off(this.body,"sleepEnd");return this}};t.exports=r},function(t,e,i){var n=i(138),s=i(72),r=i(86),o=i(36),a=i(2),h=i(87),l=i(82),u={parseBody:function(t,e,i,n,r){for(var h=a(r,"fixtures",[]),l=[],u=0;u<h.length;u++)for(var c=this.parseFixture(h[u]),d=0;d<c.length;d++)l.push(c[d]);var f=o.extend({},!1,r);delete f.fixtures,delete f.type;var p=s.create(f);return s.setParts(p,l),p.render.sprite.xOffset=p.position.x/i,p.render.sprite.yOffset=p.position.y/n,s.setPosition(p,{x:t,y:e}),p},parseFixture:function(t){var e,i=o.extend({},!1,t);if(delete i.circle,delete i.vertices,t.circle){var s=a(t.circle,"x"),r=a(t.circle,"y"),h=a(t.circle,"radius");e=[n.circle(s,r,h,i)]}else t.vertices&&(e=this.parseVertices(t.vertices,i));return e},parseVertices:function(t,e){var i,n,a,u,c,d=[];for(e=e||{},u=0;u<t.length;u+=1)d.push(s.create(o.extend({position:l.centre(t[u]),vertices:t[u]},e)));for(i=0;i<d.length;i++){var f=d[i];for(n=i+1;n<d.length;n++){var p=d[n];if(r.overlaps(f.bounds,p.bounds)){var g=f.vertices,v=p.vertices;for(a=0;a<f.vertices.length;a++)for(c=0;c<p.vertices.length;c++){var y=h.magnitudeSquared(h.sub(g[(a+1)%g.length],v[c])),m=h.magnitudeSquared(h.sub(g[a],v[(c+1)%v.length]));y<5&&m<5&&(g[a].isInternal=!0,v[c].isInternal=!0)}}}}return d}};t.exports=u},function(t,e,i){var n=i(138),s=i(72),r=i(2),o=i(1324),a=i(82),h={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,n){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},n)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body),this.body=t;for(var i=0;i<t.parts.length;i++)t.parts[i].gameObject=this;var n=this;return t.destroy=function(){n.world.remove(n.body),n.body.gameObject=null},e&&this.world.add(t),this._originComponent&&this.setOrigin(t.render.sprite.xOffset,t.render.sprite.yOffset),this},setBody:function(t,e){if(!t)return this;var i;"string"==typeof t&&(t={type:t});var h=r(t,"type","rectangle"),l=r(t,"x",this._tempVec2.x),u=r(t,"y",this._tempVec2.y),c=r(t,"width",this.width),d=r(t,"height",this.height);switch(h){case"rectangle":i=n.rectangle(l,u,c,d,e);break;case"circle":var f=r(t,"radius",Math.max(c,d)/2),p=r(t,"maxSides",25);i=n.circle(l,u,f,e,p);break;case"trapezoid":var g=r(t,"slope",.5);i=n.trapezoid(l,u,c,d,g,e);break;case"polygon":var v=r(t,"sides",5),y=r(t,"radius",Math.max(c,d)/2);i=n.polygon(l,u,v,y,e);break;case"fromVertices":case"fromVerts":var m=r(t,"verts",null);if(m)if("string"==typeof m&&(m=a.fromPath(m)),this.body&&!this.body.hasOwnProperty("temp"))s.setVertices(this.body,m),i=this.body;else{var x=r(t,"flagInternal",!1),T=r(t,"removeCollinear",.01),w=r(t,"minimumArea",10);i=n.fromVertices(l,u,m,e,x,T,w)}break;case"fromPhysicsEditor":i=o.parseBody(l,u,c,d,t)}return i&&this.setExistingBody(i,t.addToWorld),this}};t.exports=h},function(t,e){t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},function(t,e,i){var n=i(72),s={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=s},function(t,e,i){var n=i(72),s=i(3),r={setMass:function(t){return n.setMass(this.body,t),this},setDensity:function(t){return n.setDensity(this.body,t),this},centerOfMass:{get:function(){return new s(this.body.render.sprite.xOffset*this.width,this.body.render.sprite.yOffset*this.height)}}};t.exports=r},function(t,e){t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},function(t,e){var i={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};t.exports=i},function(t,e,i){var n=i(72),s={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),n.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return n.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=s},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return this.body.collisionFilter.mask=e,this}};t.exports=i},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e,i){var n=i(452),s=i(2),r=i(3);t.exports=function(t,e,i){void 0===i&&(i={});var o=e.x,a=e.y;e.body={temp:!0,position:{x:o,y:a}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n}),e.world=t,e._tempVec2=new r(o,a);var h=s(i,"shape",null);return h||(h="rectangle"),e.setBody(h,i),e}},function(t,e,i){t.exports={Factory:i(1291),Image:i(1288),Matter:i(541),MatterPhysics:i(1307),PolyDecomp:i(1290),Sprite:i(1287),TileBody:i(544),World:i(1281)}},function(t,e){t.exports=function(t,e,i,n){var s,r,o=e.pos.y+e.size.y-i.pos.y;if(n){var a=e===n?i:e;n.vel.y=-n.vel.y*n.bounciness+a.vel.y,s=0,n===e&&Math.abs(n.vel.y-a.vel.y)<n.minBounceVelocity&&(n.standing=!0,s=a.vel.x*t.delta);var h=t.collisionMap.trace(n.pos.x,n.pos.y,s,n===e?-o:o,n.size.x,n.size.y);n.pos.y=h.pos.y,n.pos.x=h.pos.x}else if(t.gravity&&(i.standing||e.vel.y>0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e){t.exports=function(t,e,i,n){var s=e.pos.x+e.size.x-i.pos.x;if(n){var r=e===n?i:e;n.vel.x=-n.vel.x*n.bounciness+r.vel.x;var o=t.collisionMap.trace(n.pos.x,n.pos.y,n===e?-s:s,0,n.size.x,n.size.y);n.pos.x=o.pos.x}else{var a=(e.vel.x-i.vel.x)/2;e.vel.x=-a,i.vel.x=a;var h=t.collisionMap.trace(e.pos.x,e.pos.y,-s/2,0,e.size.x,e.size.y);e.pos.x=Math.floor(h.pos.x);var l=t.collisionMap.trace(i.pos.x,i.pos.y,s/2,0,i.size.x,i.size.y);i.pos.x=Math.ceil(l.pos.x)}}},function(t,e,i){var n=i(240),s=i(548),r=i(1337),o=i(1336);t.exports=function(t,e,i){var a=null;e.collides===n.LITE||i.collides===n.FIXED?a=e:i.collides!==n.LITE&&e.collides!==n.FIXED||(a=i),e.last.x+e.size.x>i.last.x&&e.last.x<i.last.x+i.size.x?(e.last.y<i.last.y?o(t,e,i,a):o(t,i,e,a),e.collideWith(i,"y"),i.collideWith(e,"y"),t.emit(s.COLLIDE,e,i,"y")):e.last.y+e.size.y>i.last.y&&e.last.y<i.last.y+i.size.y&&(e.last.x<i.last.x?r(t,e,i,a):r(t,i,e,a),e.collideWith(i,"x"),i.collideWith(e,"x"),t.emit(s.COLLIDE,e,i,"x"))}},function(t,e,i){var n=i(0),s=i(1296),r=i(2),o=i(103),a=i(17),h=i(16),l=i(1292),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(h.BOOT,this.boot,this),t.sys.events.on(h.START,this.start,this)},boot:function(){this.world=new l(this.scene,this.config),this.add=new s(this.world),this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new l(this.scene,this.config),this.add=new s(this.world));var t=this.systems.events;t.on(h.UPDATE,this.world.update,this.world),t.once(h.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return o(r(e,"impact",{}),r(t,"impact",{}))},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},shutdown:function(){var t=this.systems.events;t.off(h.UPDATE,this.world.update,this.world),t.off(h.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});a.register("ImpactPhysics",u,"impactPhysics"),t.exports=u},function(t,e){var i={setVelocityX:function(t){return this.vel.x=t,this},setVelocityY:function(t){return this.vel.y=t,this},setVelocity:function(t,e){return void 0===e&&(e=t),this.vel.x=t,this.vel.y=e,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.maxVel.x=t,this.maxVel.y=e,this}};t.exports=i},function(t,e){var i={setGameObject:function(t,e){return void 0===e&&(e=!0),t?(this.body.gameObject=t,e&&this.syncGameObject()):this.body.gameObject=null,this},syncGameObject:function(){var t=this.body.gameObject;return t&&this.setBodySize(t.width*t.scaleX,t.height*t.scaleY),this}};t.exports=i},function(t,e){t.exports={setOffset:function(t,e,i,n){return this.body.offset.x=t,this.body.offset.y=e,i&&this.setBodySize(i,n),this}}},function(t,e){t.exports={setGravity:function(t){return this.body.gravityFactor=t,this},gravity:{get:function(){return this.body.gravityFactor},set:function(t){this.body.gravityFactor=t}}}},function(t,e){t.exports={setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setFriction:function(t,e){return this.friction.x=t,this.friction.y=e,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e,i){var n=i(240),s={_collideCallback:null,_callbackScope:null,setCollideCallback:function(t,e){return this._collideCallback=t,e&&(this._callbackScope=e),this},setCollidesNever:function(){return this.body.collides=n.NEVER,this},setLiteCollision:function(){return this.body.collides=n.LITE,this},setPassiveCollision:function(){return this.body.collides=n.PASSIVE,this},setActiveCollision:function(){return this.body.collides=n.ACTIVE,this},setFixedCollision:function(){return this.body.collides=n.FIXED,this},collides:{get:function(){return this.body.collides},set:function(t){this.body.collides=t}}};t.exports=s},function(t,e,i){var n=i(239),s={setAvsB:function(){return this.setTypeA(),this.setCheckAgainstB()},setBvsA:function(){return this.setTypeB(),this.setCheckAgainstA()},setCheckAgainstNone:function(){return this.body.checkAgainst=n.NONE,this},setCheckAgainstA:function(){return this.body.checkAgainst=n.A,this},setCheckAgainstB:function(){return this.body.checkAgainst=n.B,this},checkAgainst:{get:function(){return this.body.checkAgainst},set:function(t){this.body.checkAgainst=t}}};t.exports=s},function(t,e){t.exports={setBounce:function(t){return this.body.bounciness=t,this},setMinBounceVelocity:function(t){return this.body.minBounceVelocity=t,this},bounce:{get:function(){return this.body.bounciness},set:function(t){this.body.bounciness=t}}}},function(t,e,i){var n=i(239),s={getBodyType:function(){return this.body.type},setTypeNone:function(){return this.body.type=n.NONE,this},setTypeA:function(){return this.body.type=n.A,this},setTypeB:function(){return this.body.type=n.B,this}};t.exports=s},function(t,e){var i={setBodySize:function(t,e){return void 0===e&&(e=t),this.body.size.x=Math.round(t),this.body.size.y=Math.round(e),this},setBodyScale:function(t,e){void 0===e&&(e=t);var i=this.body.gameObject;return i?(i.setScale(t,e),this.setBodySize(i.width*i.scaleX,i.height*i.scaleY)):this.setBodySize(this.body.size.x*t,this.body.size.y*e)}};t.exports=i},function(t,e){t.exports={setAccelerationX:function(t){return this.accel.x=t,this},setAccelerationY:function(t){return this.accel.y=t,this},setAcceleration:function(t,e){return this.accel.x=t,this.accel.y=e,this}}},function(t,e){var i=.5,n=1/3,s=2/3;t.exports={2:[0,1,1,0,!0],3:[0,1,1,i,!0],4:[0,i,1,0,!0],5:[0,1,1,s,!0],6:[0,s,1,n,!0],7:[0,n,1,0,!0],8:[i,1,0,0,!0],9:[1,0,i,1,!0],10:[i,1,1,0,!0],11:[0,0,i,1,!0],12:[0,0,1,0,!1],13:[1,1,0,0,!0],14:[1,i,0,0,!0],15:[1,1,0,i,!0],16:[1,n,0,0,!0],17:[1,s,0,n,!0],18:[1,1,0,s,!0],19:[1,1,i,0,!0],20:[i,0,0,1,!0],21:[0,1,i,0,!0],22:[i,0,1,1,!0],23:[1,1,0,1,!1],24:[0,0,1,1,!0],25:[0,0,1,i,!0],26:[0,i,1,1,!0],27:[0,0,1,n,!0],28:[0,n,1,s,!0],29:[0,s,1,1,!0],30:[n,1,0,0,!0],31:[1,0,s,1,!0],32:[s,1,1,0,!0],33:[0,0,n,1,!0],34:[1,0,1,1,!1],35:[1,0,0,1,!0],36:[1,i,0,1,!0],37:[1,0,0,i,!0],38:[1,s,0,1,!0],39:[1,n,0,s,!0],40:[1,0,0,n,!0],41:[s,1,n,0,!0],42:[s,0,n,1,!0],43:[n,1,s,0,!0],44:[n,0,s,1,!0],45:[0,1,0,0,!1],52:[1,1,s,0,!0],53:[n,0,0,1,!0],54:[0,1,n,0,!0],55:[s,0,1,1,!0]}},function(t,e){t.exports="resume"},function(t,e){t.exports="pause"},function(t,e){t.exports="collide"},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&o<t.slopeStanding.max&&(t.standing=!0)}}t.pos.x=e.pos.x,t.pos.y=e.pos.y}},function(t,e,i){var n=i(23);t.exports=function(t,e,i,s,r){if(i)return n(e+i*t,-r,r);if(s){var o=s*t;return e-o>0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e,i){t.exports={Body:i(1298),Events:i(548),COLLIDES:i(240),CollisionMap:i(1297),Factory:i(1296),Image:i(1294),ImpactBody:i(1295),ImpactPhysics:i(1339),Sprite:i(1293),TYPE:i(239),World:i(1292)}},function(t,e,i){t.exports={Arcade:i(577),Impact:i(1358),Matter:i(1335)}},function(t,e,i){(function(e){i(1280);var n=i(28),s=i(19),r={Actions:i(450),Animations:i(1191),Cache:i(1176),Cameras:i(1173),Core:i(1097),Class:i(0),Create:i(1038),Curves:i(1032),Data:i(1029),Display:i(1027),DOM:i(998),Events:i(997),Game:i(995),GameObjects:i(902),Geom:i(279),Input:i(635),Loader:i(601),Math:i(387),Physics:i(1359),Plugins:i(538),Renderer:i(1304),Scale:i(536),Scene:i(331),Scenes:i(535),Sound:i(533),Structs:i(532),Textures:i(531),Tilemaps:i(529),Time:i(480),Tweens:i(478),Utils:i(468)};r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(215))}])}); </script> 
<script> !
function(t) {
	var e = {};

	function n(o) {
		if (e[o]) return e[o].exports;
		var r = e[o] = {
			i: o,
			l: !1,
			exports: {}
		};
		return t[o].call(r.exports, r, r.exports, n), r.l = !0, r.exports
	}
	n.m = t, n.c = e, n.d = function(t, e, o) {
		n.o(t, e) || Object.defineProperty(t, e, {
			enumerable: !0,
			get: o
		})
	}, n.r = function(t) {
		"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
			value: "Module"
		}), Object.defineProperty(t, "__esModule", {
			value: !0
		})
	}, n.t = function(t, e) {
		if (1 & e && (t = n(t)), 8 & e) return t;
		if (4 & e && "object" == typeof t && t && t.__esModule) return t;
		var o = Object.create(null);
		if (n.r(o), Object.defineProperty(o, "default", {
			enumerable: !0,
			value: t
		}), 2 & e && "string" != typeof t) for (var r in t) n.d(o, r, function(e) {
			return t[e]
		}.bind(null, r));
		return o
	}, n.n = function(t) {
		var e = t && t.__esModule ?
		function() {
			return t.
		default
		} : function() {
			return t
		};
		return n.d(e, "a", e), e
	}, n.o = function(t, e) {
		return Object.prototype.hasOwnProperty.call(t, e)
	}, n.p = "", n(n.s = 3)
}([function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i, s = n(1),
		a = n(20),
		l = n(22),
		d = n(23),
		h = n(24),
		u = n(25),
		f = n(2),
		p = n(26),
		c = n(27);
	!
	function(t) {
		t.PLAYING = "playing", t.WIN = "win", t.LOSE = "lose"
	}(i || (i = {}));
	var k = function(t) {
			function e(e, n, o) {
				var r = t.call(this, {
					key: "MainScene"
				}) || this;
				return r.w = e, r.h = n, r.r = o, r.dx = 2 * r.r, r.dy = r.r * Math.sqrt(3), r
			}
			return r(e, t), Object.defineProperty(e.prototype, "blocks", {
				get: function() {
					return this.data.get("blocks")
				},
				set: function(t) {
					this.data.set("blocks", t)
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "blocksData", {
				get: function() {
					var t = [];
					return this.blocks.forEach(function(e, n) {
						t[n] = [], e.forEach(function(e, o) {
							t[n][o] = e.isWall
						})
					}), t
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "cat", {
				get: function() {
					return this.data.get("cat")
				},
				set: function(t) {
					this.data.set("cat", t)
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "statusBar", {
				get: function() {
					return this.data.get("status_bar")
				},
				set: function(t) {
					this.data.set("status_bar", t)
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "creditText", {
				get: function() {
					return this.data.get("credit_text")
				},
				set: function(t) {
					this.data.set("credit_text", t)
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "state", {
				get: function() {
					return this.data.get("state")
				},
				set: function(t) {
					switch (t) {
					case i.PLAYING:
						break;
					case i.LOSE:
						this.setStatusText(f.
                    default ("猫已经跑到地图边缘了，你输了"));
						break;
					case i.WIN:
						this.setStatusText(f.
					default ("猫已经无路可走，你赢了"));
						break;
					default:
						return
					}
					this.data.set("state", t)
				},
				enumerable: !0,
				configurable: !0
			}), e.getNeighbours = function(t, e) {
				var n, o, r, i, s = {
					i: t - 1,
					j: e
				},
					a = {
						i: t + 1,
						j: e
					};
				0 == (1 & e) ? (n = {
					i: t - 1,
					j: e - 1
				}, o = {
					i: t,
					j: e - 1
				}, r = {
					i: t - 1,
					j: e + 1
				}, i = {
					i: t,
					j: e + 1
				}) : (n = {
					i: t,
					j: e - 1
				}, o = {
					i: t + 1,
					j: e - 1
				}, r = {
					i: t,
					j: e + 1
				}, i = {
					i: t + 1,
					j: e + 1
				});
				var l = [];
				return l[0] = s, l[1] = n, l[2] = o, l[3] = a, l[4] = i, l[5] = r, l
			}, e.prototype.preload = function() {
				var t = this.r / s.
			default.catStepLength;
				for (var e in s.
			default.textures) this.load.addFile(new c.
			default (this.load, e, s.
			default.textures[e], {
					scale: t
				}))
			}, e.prototype.create = function() {
				this.createAnimations(), this.createBlocks(), this.createCat(), this.createStatusText(), this.createResetButton(), this.createCreditText(), this.reset(), this.game.solver && (this.cat.solver = this.game.solver)
			}, e.prototype.getPosition = function(t, e) {
				return {
					x: 3 * this.r + (0 == (1 & e) ? this.r : this.dx) + t * this.dx,
					y: 3 * this.r + this.r + e * this.dy
				}
			}, e.prototype.getBlock = function(t, e) {
				return t >= 0 && t < this.w && e >= 0 && e < this.h ? this.blocks[t][e] : null
			}, e.prototype.playerClick = function(t, e) {
				if (this.cat.anims.isPlaying && this.cat.anims.stop(), this.state !== i.PLAYING) return this.setStatusText(f.
			default ("游戏已经结束，重新开局")), document.getElementById("time").innerHTML = 0,this.reset(), !1;
				var n = this.getBlock(t, e);
				return n ? n.isWall ? (this.setStatusText(f.
			default ("点击位置已经是墙了，禁止点击")), !1) : this.cat.i === t && this.cat.j === e ? (this.setStatusText(f.
			default ("点击位置是猫当前位置，禁止点击")), !1) : (n.isWall = !0, this.cat.isCaught() ? (this.setStatusText(f.
			default ("猫已经无路可走，你赢了")), this.state = i.WIN, !1) : (this.setStatusText(f.
			default ("您点击了 ") + "(" + t + ", " + e + ")"), this.cat.step() || (this.setStatusText(f.
			default ("猫认输，你赢了！")), this.state = i.WIN), !0)) : (this.setStatusText(f.
			default ("代码错误，当前位置不存在")), !1)
			}, e.prototype.reset = function() {
				time = 0;
				this.cat.reset(), this.resetBlocks(), this.randomWall(), this.state = i.PLAYING, this.setStatusText(f.
			default ("点击小圆点，围住小猫"))
			}, e.prototype.setStatusText = function(t) {
				this.statusBar.setText(t)
			}, e.prototype.createAnimations = function() {
				var t = this;
				s.
			default.animations.forEach(function(e) {
					var n = [];
					e.textures.forEach(function(t) {
						n.push({
							key: t,
							frame: 0
						})
					}), t.anims.create({
						key: e.name,
						frames: n,
						frameRate: s.
					default.frameRate,
						repeat:
						e.repeat
					})
				})
			}, e.prototype.createBlocks = function() {
				for (var t = [], e = 0; e < this.w; e++) {
					t[e] = [];
					for (var n = 0; n < this.h; n++) {
						var o = new l.
					default (this, e, n, .9 * this.r);
						t[e][n] = o, this.add.existing(o), o.on("player_click", this.playerClick.bind(this))
					}
				}
				this.blocks = t
			}, e.prototype.createCat = function() {
				var t = this,
					e = new a.
				default (this);
				e.on("escaped", function() {
					t.state = i.LOSE
				}), e.on("win", function() {
					t.state = i.WIN
				}), e.solver = p.
			default, this.cat = e, this.add.existing(e)
			}, e.prototype.createStatusText = function() {
				var t = new h.
			default (this);
				this.statusBar = t, this.add.existing(t)
			}, e.prototype.createResetButton = function() {
				var t = this,
					e = new d.
				default (this);
				this.add.existing(e), e.on("pointerup", function() {
					time = 0;
					t.reset()
				})
			}, e.prototype.createCreditText = function() {
				var t = new u.
			default (this);
				this.creditText = t, this.add.existing(t)
			}, e.prototype.resetBlocks = function() {
				this.blocks.forEach(function(t) {
					t.forEach(function(t) {
						t.isWall = !1
					})
				})
			}, e.prototype.randomWall = function() {
				for (var t = 0; t < 8; t++) {
					var e = Math.floor(this.w * Math.random()),
						n = Math.floor(this.h * Math.random());
					e === this.cat.i && n === this.cat.j || (this.getBlock(e, n).isWall = !0)
				}
			}, e
		}(Phaser.Scene);
	e.
default = k
}, function(t, e, n) {
	"use strict";
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var o = n(5),
		r = n(6),
		i = n(7),
		s = n(8),
		a = n(9),
		l = n(10),
		d = n(11),
		h = n(12),
		u = n(13),
		f = n(14),
		p = n(15),
		c = n(16),
		k = n(17),
		g = n(18),
		w = n(19);
	e.
default = {
		textures: {
			bottom_left_1: o,
			bottom_left_2: r,
			bottom_left_3: i,
			bottom_left_4: s,
			bottom_left_5: a,
			left_1: l,
			left_2: d,
			left_3: h,
			left_4: u,
			left_5: f,
			top_left_1: p,
			top_left_2: c,
			top_left_3: k,
			top_left_4: g,
			top_left_5: w
		},
		animations: [{
			name: "left_step",
			textures: ["left_1", "left_2", "left_3", "left_4", "left_5"],
			repeat: 0
		}, {
			name: "top_left_step",
			textures: ["top_left_1", "top_left_2", "top_left_3", "top_left_4", "top_left_5"],
			repeat: 0
		}, {
			name: "bottom_left_step",
			textures: ["bottom_left_1", "bottom_left_2", "bottom_left_3", "bottom_left_4", "bottom_left_5"],
			repeat: 0
		}, {
			name: "left_run",
			textures: ["left_2", "left_3", "left_4", "left_5"],
			repeat: 3
		}, {
			name: "top_left_run",
			textures: ["top_left_2", "top_left_3", "top_left_4", "top_left_5"],
			repeat: 3
		}, {
			name: "bottom_left_run",
			textures: ["bottom_left_2", "bottom_left_3", "bottom_left_4", "bottom_left_5"],
			repeat: 3
		}],
		origins: {
			left: {
				x: .75,
				y: .75
			},
			top_left: {
				x: .63,
				y: .83
			},
			bottom_left: {
				x: .65,
				y: .5
			}
		},
		stopTextures: {
			left: "left_1",
			top_left: "top_left_1",
			bottom_left: "bottom_left_1"
		},
		cannotEscapeTextures: {
			left: "left_2",
			top_left: "top_left_2",
			bottom_left: "bottom_left_2"
		},
		directions: [{
			scaleX: 1,
			name: "left"
		}, {
			scaleX: 1,
			name: "top_left"
		}, {
			scaleX: -1,
			name: "top_left"
		}, {
			scaleX: -1,
			name: "left"
		}, {
			scaleX: -1,
			name: "bottom_left"
		}, {
			scaleX: 1,
			name: "bottom_left"
		}],
		catDefaultDirection: 5,
		catStepLength: 20,
		frameRate: 15,
		translations: {}
	}
}, function(t, e, n) {
	"use strict";
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var o = n(1);
	e.
default = function(t) {
		var e = o.
	default.translations[t];
		return void 0 === e ? t:
		e
	}
}, function(t, e, n) {
	"use strict";
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var o = n(4);
	window.CatchTheCatGame = o.
default
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = n(0),
		s = function(t) {
			function e(e) {
				var n = this;
				e.credit || (e.credit = "github.com/ganlvtech"), e.backgroundColor || (e.backgroundColor = 15658734);
				var o = e.w,
					r = e.h,
					s = e.r * window.devicePixelRatio,
					a = 1 / window.devicePixelRatio,
					l = Math.floor((6.5 + 2 * o) * s),
					d = Math.floor((6 + Math.sqrt(3) * r) * s),
					h = new i.
				default (o, r, s),
					u = {
						width: l,
						height: d,
						type: Phaser.AUTO,
						parent: e.parent,
						backgroundColor: e.backgroundColor,
						scene: h,
						zoom: a
					};
				return (n = t.call(this, u) || this).myConfig = e, n.mainScene = h, n
			}
			return r(e, t), Object.defineProperty(e.prototype, "solver", {
				get: function() {
					return this._solver
				},
				set: function(t) {
					this._solver = t;
					try {
						this.mainScene.cat.solver = t
					} finally {}
				},
				enumerable: !0,
				configurable: !0
			}), e
		}(Phaser.Game);
	/*!
	 * Catch The Cat Game
	 *
	 * https://github.com/ganlvtech/phaser-catch-the-cat
	 */
	e.
default = s
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="70.15px" width="49.75px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 32.75, 36.25)">\n    <use height="41.55" transform="matrix(1.0, 0.0, 0.0, 1.0, -12.35, -33.05)" width="29.35" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -13.95, -35.9)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 12.35, 33.05)">\n      <path d="M11.4 -6.8 Q12.65 -7.45 13.55 -9.3 14.5 -11.1 14.5 -12.8 14.5 -16.3 11.9 -20.5 9.25 -24.75 9.25 -26.35 L9.35 -28.5 Q9.65 -29.65 10.9 -30.55" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M10.3 -5.9 Q10.3 -2.6 8.05 -0.25 5.8 2.1 2.6 2.1 -0.6 2.1 -2.85 -0.25 -5.1 -2.6 -5.1 -5.9 -5.1 -9.2 -2.85 -11.55 -0.6 -13.9 2.6 -13.9 5.8 -13.9 8.05 -11.55 10.3 -9.2 10.3 -5.9" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M10.3 -5.9 Q10.3 -2.6 8.05 -0.25 5.8 2.1 2.6 2.1 -0.6 2.1 -2.85 -0.25 -5.1 -2.6 -5.1 -5.9 -5.1 -9.2 -2.85 -11.55 -0.6 -13.9 2.6 -13.9 5.8 -13.9 8.05 -11.55 10.3 -9.2 10.3 -5.9 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M3.4 -13.3 Q3.4 -10.65 1.6 -8.8 -0.25 -6.9 -2.85 -6.9 -5.4 -6.9 -7.25 -8.8 -9.1 -10.65 -9.1 -13.3 -9.1 -15.95 -7.25 -17.85 -5.4 -19.7 -2.85 -19.7 -0.25 -19.7 1.6 -17.85 3.4 -15.95 3.4 -13.3" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M3.4 -13.3 Q3.4 -10.65 1.6 -8.8 -0.25 -6.9 -2.85 -6.9 -5.4 -6.9 -7.25 -8.8 -9.1 -10.65 -9.1 -13.3 -9.1 -15.95 -7.25 -17.85 -5.4 -19.7 -2.85 -19.7 -0.25 -19.7 1.6 -17.85 3.4 -15.95 3.4 -13.3 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M4.95 2.6 L9.6 -0.8" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-9.0 -12.7 L-6.85 -3.5" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-6.85 -3.5 L-8.6 4.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-8.6 4.75 L-9.85 4.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-0.5 -11.05 L1.25 -2.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M1.25 -2.25 L-1.25 5.85" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-1.15 5.6 L-3.45 6.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="70.15px" width="49.75px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 32.75, 36.25)">\n    <use height="44.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -13.15, -36.25)" width="30.15" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -23.55, -24.35)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 13.15, 36.25)">\n      <path d="M11.4 -11.2 Q12.65 -11.8 13.55 -13.6 14.5 -15.3 14.5 -16.9 14.5 -20.2 11.9 -24.2 9.25 -28.25 9.25 -29.75 L9.35 -31.8 Q9.65 -32.9 10.9 -33.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M8.7 -6.95 Q6.45 -4.6 3.25 -4.6 0.05 -4.6 -2.2 -6.95 -4.45 -9.3 -4.45 -12.6 -4.45 -15.9 -2.2 -18.25 0.05 -20.6 3.25 -20.6 6.45 -20.6 8.7 -18.25 10.95 -15.9 10.95 -12.6 10.95 -9.3 8.7 -6.95" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M8.7 -6.95 Q6.45 -4.6 3.25 -4.6 0.05 -4.6 -2.2 -6.95 -4.45 -9.3 -4.45 -12.6 -4.45 -15.9 -2.2 -18.25 0.05 -20.6 3.25 -20.6 6.45 -20.6 8.7 -18.25 10.95 -15.9 10.95 -12.6 10.95 -9.3 8.7 -6.95 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M-0.45 -8.35 Q-2.3 -6.45 -4.9 -6.45 -7.45 -6.45 -9.3 -8.35 -11.15 -10.2 -11.15 -12.85 -11.15 -15.5 -9.3 -17.4 -7.45 -19.25 -4.9 -19.25 -2.3 -19.25 -0.45 -17.4 1.35 -15.5 1.35 -12.85 1.35 -10.2 -0.45 -8.35" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-0.45 -8.35 Q-2.3 -6.45 -4.9 -6.45 -7.45 -6.45 -9.3 -8.35 -11.15 -10.2 -11.15 -12.85 -11.15 -15.5 -9.3 -17.4 -7.45 -19.25 -4.9 -19.25 -2.3 -19.25 -0.45 -17.4 1.35 -15.5 1.35 -12.85 1.35 -10.2 -0.45 -8.35 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M7.8 0.4 L10.1 -4.9" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-9.0 -12.7 L-6.85 -3.5" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-6.85 -3.5 L-8.6 4.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-8.6 4.75 L-9.85 4.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-0.5 -11.05 L1.25 -2.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M1.25 -2.25 L-1.25 5.85" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-1.15 5.6 L-3.45 6.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="70.15px" width="49.75px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 32.75, 36.25)">\n    <use height="61.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -19.15, -36.25)" width="34.65" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -23.95, -10.45)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 19.15, 36.25)">\n      <path d="M13.0 -33.75 Q10.3 -33.75 9.7 -30.65 9.5 -29.75 9.5 -24.75 9.5 -21.55 7.25 -20.35 4.25 -18.75 3.5 -17.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M4.95 -4.95 Q2.7 -2.6 -0.5 -2.6 -3.7 -2.6 -5.95 -4.95 -8.2 -7.3 -8.2 -10.6 -8.2 -13.9 -5.95 -16.25 -3.7 -18.6 -0.5 -18.6 2.7 -18.6 4.95 -16.25 7.2 -13.9 7.2 -10.6 7.2 -7.3 4.95 -4.95" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M4.95 -4.95 Q2.7 -2.6 -0.5 -2.6 -3.7 -2.6 -5.95 -4.95 -8.2 -7.3 -8.2 -10.6 -8.2 -13.9 -5.95 -16.25 -3.7 -18.6 -0.5 -18.6 2.7 -18.6 4.95 -16.25 7.2 -13.9 7.2 -10.6 7.2 -7.3 4.95 -4.95 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M-6.45 0.15 Q-8.3 2.05 -10.9 2.05 -13.45 2.05 -15.3 0.15 -17.15 -1.7 -17.15 -4.35 -17.15 -7.0 -15.3 -8.9 -13.45 -10.75 -10.9 -10.75 -8.3 -10.75 -6.45 -8.9 -4.65 -7.0 -4.65 -4.35 -4.65 -1.7 -6.45 0.15" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-6.45 0.15 Q-8.3 2.05 -10.9 2.05 -13.45 2.05 -15.3 0.15 -17.15 -1.7 -17.15 -4.35 -17.15 -7.0 -15.3 -8.9 -13.45 -10.75 -10.9 -10.75 -8.3 -10.75 -6.45 -8.9 -4.65 -7.0 -4.65 -4.35 -4.65 -1.7 -6.45 0.15 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M8.2 0.6 L7.55 -5.1" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-15.75 8.25 L-16.0 16.1 -16.25 23.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-3.75 1.0 Q-3.75 4.9 -6.35 6.4 -9.9 8.45 -10.25 9.0 -12.0 11.95 -12.55 13.6 -13.6 16.65 -13.0 19.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="70.15px" width="49.75px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 32.75, 36.25)">\n    <use height="59.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -27.0, -28.25)" width="36.75" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -29.5, 4.05)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 27.0, 28.25)">\n      <path d="M-5.5 -13.0 Q-5.85 -15.55 -2.55 -16.1 1.1 -16.7 1.25 -19.25 1.35 -21.4 2.6 -23.25 4.3 -25.8 7.25 -25.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-2.55 0.65 Q-4.8 3.0 -8.0 3.0 -11.2 3.0 -13.45 0.65 -15.7 -1.7 -15.7 -5.0 -15.7 -8.3 -13.45 -10.65 -11.2 -13.0 -8.0 -13.0 -4.8 -13.0 -2.55 -10.65 -0.3 -8.3 -0.3 -5.0 -0.3 -1.7 -2.55 0.65" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-2.55 0.65 Q-4.8 3.0 -8.0 3.0 -11.2 3.0 -13.45 0.65 -15.7 -1.7 -15.7 -5.0 -15.7 -8.3 -13.45 -10.65 -11.2 -13.0 -8.0 -13.0 -4.8 -13.0 -2.55 -10.65 -0.3 -8.3 -0.3 -5.0 -0.3 -1.7 -2.55 0.65 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M-10.6 8.3 Q-12.45 10.2 -15.05 10.2 -17.6 10.2 -19.45 8.3 -21.3 6.45 -21.3 3.8 -21.3 1.15 -19.45 -0.75 -17.6 -2.6 -15.05 -2.6 -12.45 -2.6 -10.6 -0.75 -8.8 1.15 -8.8 3.8 -8.8 6.45 -10.6 8.3" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-10.6 8.3 Q-12.45 10.2 -15.05 10.2 -17.6 10.2 -19.45 8.3 -21.3 6.45 -21.3 3.8 -21.3 1.15 -19.45 -0.75 -17.6 -2.6 -15.05 -2.6 -12.45 -2.6 -10.6 -0.75 -8.8 1.15 -8.8 3.8 -8.8 6.45 -10.6 8.3 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M-1.25 -3.0 Q-0.5 -3.15 1.6 -4.55 L4.25 -6.25 4.25 1.25 Q4.0 1.25 4.0 1.75 L3.75 1.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-11.5 11.25 Q-10.0 10.4 -9.5 10.5 L-9.5 13.75 -12.0 21.75 Q-12.3 22.65 -13.2 23.3 L-14.75 24.5 -16.0 26.3 Q-16.65 27.0 -17.7 26.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-24.5 29.0 L-22.75 29.0 Q-19.65 23.1 -20.25 13.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="70.15px" width="49.75px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 32.75, 36.25)">\n    <use height="54.15" transform="matrix(1.0, 0.0, 0.0, 1.0, -28.6, -20.25)" width="33.1" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -32.75, 6.05)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 28.6, 20.25)">\n      <path d="M-9.0 -2.0 Q-7.2 -3.0 -5.75 -5.25 L-3.25 -10.0 -0.15 -13.55 Q1.85 -15.6 2.0 -17.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-7.55 11.45 Q-9.8 13.8 -13.0 13.8 -16.2 13.8 -18.45 11.45 -20.7 9.1 -20.7 5.8 -20.7 2.5 -18.45 0.15 -16.2 -2.2 -13.0 -2.2 -9.8 -2.2 -7.55 0.15 -5.3 2.5 -5.3 5.8 -5.3 9.1 -7.55 11.45" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-7.55 11.45 Q-9.8 13.8 -13.0 13.8 -16.2 13.8 -18.45 11.45 -20.7 9.1 -20.7 5.8 -20.7 2.5 -18.45 0.15 -16.2 -2.2 -13.0 -2.2 -9.8 -2.2 -7.55 0.15 -5.3 2.5 -5.3 5.8 -5.3 9.1 -7.55 11.45 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M-15.6 4.75 Q-13.8 6.65 -13.8 9.3 -13.8 11.95 -15.6 13.8 -17.45 15.7 -20.05 15.7 -22.6 15.7 -24.45 13.8 -26.3 11.95 -26.3 9.3 -26.3 6.65 -24.45 4.75 -22.6 2.9 -20.05 2.9 -17.45 2.9 -15.6 4.75" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-15.6 4.75 Q-13.8 6.65 -13.8 9.3 -13.8 11.95 -15.6 13.8 -17.45 15.7 -20.05 15.7 -22.6 15.7 -24.45 13.8 -26.3 11.95 -26.3 9.3 -26.3 6.65 -24.45 4.75 -22.6 2.9 -20.05 2.9 -17.45 2.9 -15.6 4.75 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.0"/>\n      <path d="M-5.0 6.5 L-5.0 6.75 -7.75 9.7 Q-9.6 12.0 -10.0 13.25 L-10.0 16.0 -9.0 16.0 Q-8.75 15.25 -7.25 13.75 L-7.25 14.1 -9.05 18.05 Q-10.15 20.5 -10.75 23.5" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-15.25 11.25 L-15.25 11.5 -15.0 18.75 Q-15.0 21.95 -16.6 26.15 -18.35 30.8 -20.25 30.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-26.1 31.4 Q-24.95 30.5 -24.75 27.3 L-24.75 22.0 -23.2 16.85 Q-22.25 13.35 -22.5 11.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="40.05px" width="76.4px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 53.65, 32.95)">\n    <use height="36.8" transform="matrix(1.0, 0.0, 0.0, 1.0, -12.3, -30.05)" width="33.3" xlink:href="#shape0"/>\n    <use height="16.6" transform="matrix(1.0, 0.0, 0.0, 1.0, -17.5, -32.95)" width="16.3" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 12.3, 30.05)">\n      <path d="M15.4 -3.8 Q16.65 -4.45 17.55 -6.3 18.5 -8.1 18.5 -9.8 18.5 -13.3 15.9 -17.5 13.25 -21.75 13.25 -23.35 L13.35 -25.5 Q13.65 -26.65 14.9 -27.55" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M12.5 -5.9 Q12.5 -2.6 10.25 -0.25 8.0 2.1 4.8 2.1 1.6 2.1 -0.65 -0.25 -2.9 -2.6 -2.9 -5.9 -2.9 -9.2 -0.65 -11.55 1.6 -13.9 4.8 -13.9 8.0 -13.9 10.25 -11.55 12.5 -9.2 12.5 -5.9" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M12.5 -5.9 Q12.5 -2.6 10.25 -0.25 8.0 2.1 4.8 2.1 1.6 2.1 -0.65 -0.25 -2.9 -2.6 -2.9 -5.9 -2.9 -9.2 -0.65 -11.55 1.6 -13.9 4.8 -13.9 8.0 -13.9 10.25 -11.55 12.5 -9.2 12.5 -5.9 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-4.3 -13.5 Q-6.45 -14.45 -7.9 -16.4 -9.35 -18.35 -9.3 -20.2 -9.4 -22.0 -7.9 -22.6 -6.35 -23.2 -4.25 -22.25 -2.2 -21.3 -0.7 -19.35 0.75 -17.4 0.75 -15.55 0.7 -13.8 -0.85 -13.2 -2.3 -12.6 -4.3 -13.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-4.3 -13.5 Q-6.45 -14.45 -7.9 -16.4 -9.35 -18.35 -9.3 -20.2 -9.4 -22.0 -7.9 -22.6 -6.35 -23.2 -4.25 -22.25 -2.2 -21.3 -0.7 -19.35 0.75 -17.4 0.75 -15.55 0.7 -13.8 -0.85 -13.2 -2.3 -12.6 -4.3 -13.5 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-0.65 4.25 L3.95 3.45 8.65 3.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M0.0 -17.35 L1.1 -17.35 Q1.65 -16.4 2.8 -16.05 4.0 -15.7 4.65 -14.8 5.45 -13.75 5.75 -12.55 L6.05 -10.05" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-9.8 -18.65 Q-8.5 -18.5 -7.75 -16.8 -7.05 -15.2 -6.0 -15.25 L-5.3 -9.95 Q-4.6 -5.75 -4.6 -3.7 -4.6 -0.5 -5.15 1.05 -5.95 3.3 -8.0 3.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 13.5, 40.55)">\n      <path d="M1.05 -33.65 Q4.2 -30.55 1.65 -26.85 L0.5 -25.5 Q-0.2 -25.0 -1.5 -24.85 L-4.2 -24.15 -6.5 -24.25 Q-8.6 -23.9 -10.55 -24.95 -13.2 -26.65 -13.5 -29.85 L-12.05 -31.1 Q-11.95 -33.7 -10.2 -35.5 -9.15 -36.75 -7.75 -37.15 L-7.35 -40.55 Q-0.9 -35.6 1.05 -33.65" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="40.05px" width="76.4px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 53.65, 32.95)">\n    <use height="38.65" transform="matrix(1.0, 0.0, 0.0, 1.0, -11.0, -32.15)" width="33.75" xlink:href="#shape0"/>\n    <use height="16.6" transform="matrix(1.0, 0.0, 0.0, 1.0, -20.9, -23.95)" width="16.3" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.0, 32.15)">\n      <path d="M15.65 -12.65 Q18.0 -12.65 18.75 -13.7 19.25 -14.45 19.25 -16.55 19.25 -18.8 18.15 -20.3 17.05 -21.85 17.05 -22.95 17.05 -24.2 18.65 -27.0 L20.25 -29.65" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M16.0 -11.0 Q16.0 -8.25 13.5 -6.3 11.0 -4.3 7.45 -4.3 3.9 -4.3 1.45 -6.3 -1.05 -8.25 -1.05 -11.0 -1.05 -13.8 1.45 -15.75 3.9 -17.7 7.45 -17.7 11.0 -17.7 13.5 -15.75 16.0 -13.8 16.0 -11.0" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M16.0 -11.0 Q16.0 -8.25 13.5 -6.3 11.0 -4.3 7.45 -4.3 3.9 -4.3 1.45 -6.3 -1.05 -8.25 -1.05 -11.0 -1.05 -13.8 1.45 -15.75 3.9 -17.7 7.45 -17.7 11.0 -17.7 13.5 -15.75 16.0 -13.8 16.0 -11.0 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-3.5 -8.3 Q-5.65 -9.25 -7.1 -11.2 -8.55 -13.15 -8.5 -15.0 -8.6 -16.8 -7.1 -17.4 -5.55 -18.0 -3.45 -17.05 -1.4 -16.1 0.1 -14.15 1.55 -12.2 1.55 -10.35 1.5 -8.6 -0.05 -8.0 -1.5 -7.4 -3.5 -8.3" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-3.5 -8.3 Q-5.65 -9.25 -7.1 -11.2 -8.55 -13.15 -8.5 -15.0 -8.6 -16.8 -7.1 -17.4 -5.55 -18.0 -3.45 -17.05 -1.4 -16.1 0.1 -14.15 1.55 -12.2 1.55 -10.35 1.5 -8.6 -0.05 -8.0 -1.5 -7.4 -3.5 -8.3 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M0.0 -17.35 L1.1 -17.35 Q1.65 -16.4 2.8 -16.05 4.0 -15.7 4.65 -14.8 5.45 -13.75 5.75 -12.55 L6.05 -10.05" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M3.8 4.0 L8.0 4.0 Q8.8 1.7 10.45 -0.1 12.3 -2.1 14.45 -2.65 L10.65 -7.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-7.8 3.6 Q-6.05 3.6 -2.9 0.15 0.0 -3.0 0.0 -3.85 0.0 -4.8 -3.55 -8.85 L-7.4 -13.05" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 13.5, 40.55)">\n      <path d="M1.05 -33.65 Q4.2 -30.55 1.65 -26.85 L0.5 -25.5 Q-0.2 -25.0 -1.5 -24.85 L-4.2 -24.15 -6.5 -24.25 Q-8.6 -23.9 -10.55 -24.95 -13.2 -26.65 -13.5 -29.85 L-12.05 -31.1 Q-11.95 -33.7 -10.2 -35.5 -9.15 -36.75 -7.75 -37.15 L-7.35 -40.55 Q-0.9 -35.6 1.05 -33.65" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="40.05px" width="76.4px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 53.65, 32.95)">\n    <use height="39.3" transform="matrix(1.0, 0.0, 0.0, 1.0, -37.75, -32.6)" width="54.1" xlink:href="#shape0"/>\n    <use height="16.6" transform="matrix(1.0, 0.0, 0.0, 1.0, -39.75, -32.05)" width="16.3" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 37.75, 32.6)">\n      <path d="M2.4 -17.65 Q5.2 -17.3 5.35 -20.7 L5.65 -25.85 Q8.6 -31.15 13.85 -29.85" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M0.15 -15.95 Q0.15 -13.2 -2.35 -11.25 -4.85 -9.25 -8.4 -9.25 -11.95 -9.25 -14.4 -11.25 -16.9 -13.2 -16.9 -15.95 -16.9 -18.75 -14.4 -20.7 -11.95 -22.65 -8.4 -22.65 -4.85 -22.65 -2.35 -20.7 0.15 -18.75 0.15 -15.95" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M0.15 -15.95 Q0.15 -13.2 -2.35 -11.25 -4.85 -9.25 -8.4 -9.25 -11.95 -9.25 -14.4 -11.25 -16.9 -13.2 -16.9 -15.95 -16.9 -18.75 -14.4 -20.7 -11.95 -22.65 -8.4 -22.65 -4.85 -22.65 -2.35 -20.7 0.15 -18.75 0.15 -15.95 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-16.85 -14.45 L-22.35 -14.85 Q-24.9 -15.75 -25.85 -17.4 -26.9 -19.0 -25.6 -20.5 -24.25 -22.05 -21.45 -22.5 L-16.0 -22.1 Q-13.4 -21.2 -12.45 -19.5 -11.55 -17.9 -12.95 -16.35 -14.2 -14.9 -16.85 -14.45" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-16.85 -14.45 L-22.35 -14.85 Q-24.9 -15.75 -25.85 -17.4 -26.9 -19.0 -25.6 -20.5 -24.25 -22.05 -21.45 -22.5 L-16.0 -22.1 Q-13.4 -21.2 -12.45 -19.5 -11.55 -17.9 -12.95 -16.35 -14.2 -14.9 -16.85 -14.45 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M1.0 -14.4 Q0.7 -12.05 -0.6 -9.15 L-3.05 -4.4 -2.05 -4.4 3.6 -6.0 5.4 -6.0 5.4 -1.0 Q4.8 0.7 4.6 4.2 L2.8 4.2" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-6.05 -11.6 Q-5.65 -8.8 -5.65 -6.6 -4.95 -6.85 -4.6 -6.35 -4.35 -5.9 -4.4 -5.2 L-3.85 -5.0 -4.45 -5.0 -4.4 -5.2 -5.6 -6.05 Q-6.45 -6.9 -6.45 -7.7 L-6.25 -8.4" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-22.8 -16.45 L-22.15 -15.2 Q-21.95 -14.5 -21.6 -14.45 L-20.05 -14.0 Q-19.6 -13.75 -19.6 -13.15 -19.6 -11.9 -23.0 -11.9 L-26.85 -12.05 Q-28.8 -11.45 -29.55 -10.6 -30.5 -9.55 -30.25 -7.45" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-35.25 -5.45 Q-34.65 -8.8 -31.5 -11.8 -28.4 -14.75 -24.85 -15.45" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 13.5, 40.55)">\n      <path d="M1.05 -33.65 Q4.2 -30.55 1.65 -26.85 L0.5 -25.5 Q-0.2 -25.0 -1.5 -24.85 L-4.2 -24.15 -6.5 -24.25 Q-8.6 -23.9 -10.55 -24.95 -13.2 -26.65 -13.5 -29.85 L-12.05 -31.1 Q-11.95 -33.7 -10.2 -35.5 -9.15 -36.75 -7.75 -37.15 L-7.35 -40.55 Q-0.9 -35.6 1.05 -33.65" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="40.05px" width="76.4px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 53.65, 32.95)">\n    <use height="37.85" transform="matrix(1.0, 0.0, 0.0, 1.0, -42.6, -31.75)" width="46.9" xlink:href="#shape0"/>\n    <use height="16.6" transform="matrix(1.0, 0.0, 0.0, 1.0, -48.25, -23.45)" width="16.3" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 42.6, 31.75)">\n      <path d="M-14.2 -18.25 Q-11.15 -17.9 -9.2 -19.65 -8.0 -20.65 -6.3 -23.6 -4.6 -26.55 -3.4 -27.65 -1.35 -29.45 1.8 -29.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-10.6 -17.7 Q-9.9 -15.2 -11.8 -12.75 -13.75 -10.35 -17.2 -9.4 L-23.45 -9.6 Q-26.35 -10.75 -27.05 -13.25 -27.7 -15.8 -25.8 -18.2 -23.85 -20.65 -20.45 -21.55 L-14.15 -21.35 Q-11.25 -20.25 -10.6 -17.7" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-10.6 -17.7 Q-9.9 -15.2 -11.8 -12.75 -13.75 -10.35 -17.2 -9.4 L-23.45 -9.6 Q-26.35 -10.75 -27.05 -13.25 -27.7 -15.8 -25.8 -18.2 -23.85 -20.65 -20.45 -21.55 L-14.15 -21.35 Q-11.25 -20.25 -10.6 -17.7 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-32.8 -10.55 Q-35.35 -11.45 -36.3 -13.1 -37.35 -14.7 -36.05 -16.2 -34.7 -17.75 -31.9 -18.2 L-26.45 -17.8 Q-23.85 -16.9 -22.9 -15.2 -22.0 -13.6 -23.4 -12.05 -24.65 -10.6 -27.3 -10.15 -30.15 -9.65 -32.8 -10.55" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-32.8 -10.55 Q-35.35 -11.45 -36.3 -13.1 -37.35 -14.7 -36.05 -16.2 -34.7 -17.75 -31.9 -18.2 L-26.45 -17.8 Q-23.85 -16.9 -22.9 -15.2 -22.0 -13.6 -23.4 -12.05 -24.65 -10.6 -27.3 -10.15 -30.15 -9.65 -32.8 -10.55 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-7.1 -8.85 Q-9.2 -7.8 -11.75 -5.35 -14.05 -3.15 -15.75 -0.8" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-14.85 -8.35 L-13.45 -9.05 -13.25 -9.25 -14.3 -8.85 -14.55 -8.75 -14.85 -8.35 Q-15.8 -7.2 -17.1 -7.1 L-20.4 -7.15 -20.2 -7.15 -17.55 -7.9 -18.65 -7.9 -18.45 -8.65 Q-17.55 -8.65 -14.25 -9.65 L-7.1 -9.65 M-17.55 -7.9 L-16.6 -8.15 -14.55 -8.75 M-14.85 -8.35 L-15.95 -7.9 -17.55 -7.9" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-39.9 3.6 L-33.1 -4.6 Q-29.0 -9.7 -29.65 -12.6" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-33.5 -9.2 L-35.3 -1.15 Q-36.9 3.7 -40.1 3.2" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 13.5, 40.55)">\n      <path d="M1.05 -33.65 Q4.2 -30.55 1.65 -26.85 L0.5 -25.5 Q-0.2 -25.0 -1.5 -24.85 L-4.2 -24.15 -6.5 -24.25 Q-8.6 -23.9 -10.55 -24.95 -13.2 -26.65 -13.5 -29.85 L-12.05 -31.1 Q-11.95 -33.7 -10.2 -35.5 -9.15 -36.75 -7.75 -37.15 L-7.35 -40.55 Q-0.9 -35.6 1.05 -33.65" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="40.05px" width="76.4px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 53.65, 32.95)">\n    <use height="32.65" transform="matrix(1.0, 0.0, 0.0, 1.0, -44.65, -25.55)" width="45.75" xlink:href="#shape0"/>\n    <use height="16.6" transform="matrix(1.0, 0.0, 0.0, 1.0, -53.65, -26.6)" width="16.3" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 44.65, 25.55)">\n      <path d="M-18.4 -16.8 Q-15.5 -16.65 -10.1 -20.0 -4.8 -23.3 -1.4 -23.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-19.9 -11.55 Q-21.85 -9.15 -25.3 -8.2 L-31.55 -8.4 Q-34.45 -9.55 -35.15 -12.05 -35.8 -14.6 -33.9 -17.0 -31.95 -19.45 -28.55 -20.35 L-22.25 -20.15 Q-19.35 -19.05 -18.7 -16.5 -18.0 -14.0 -19.9 -11.55" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-19.9 -11.55 Q-21.85 -9.15 -25.3 -8.2 L-31.55 -8.4 Q-34.45 -9.55 -35.15 -12.05 -35.8 -14.6 -33.9 -17.0 -31.95 -19.45 -28.55 -20.35 L-22.25 -20.15 Q-19.35 -19.05 -18.7 -16.5 -18.0 -14.0 -19.9 -11.55 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-38.2 -11.4 Q-40.75 -12.3 -41.7 -13.95 -42.75 -15.55 -41.45 -17.05 -40.1 -18.6 -37.3 -19.05 L-31.85 -18.65 Q-29.25 -17.75 -28.3 -16.05 -27.4 -14.45 -28.8 -12.9 -30.05 -11.45 -32.7 -11.0 -35.55 -10.5 -38.2 -11.4" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-38.2 -11.4 Q-40.75 -12.3 -41.7 -13.95 -42.75 -15.55 -41.45 -17.05 -40.1 -18.6 -37.3 -19.05 L-31.85 -18.65 Q-29.25 -17.75 -28.3 -16.05 -27.4 -14.45 -28.8 -12.9 -30.05 -11.45 -32.7 -11.0 -35.55 -10.5 -38.2 -11.4 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-23.0 -11.6 Q-25.3 -10.6 -26.65 -6.4 L-22.4 -6.4 -22.4 -2.4 -24.65 1.65 Q-25.9 4.3 -28.05 4.6" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-41.45 4.2 Q-41.25 4.0 -40.15 3.75 -39.15 3.5 -38.85 3.0 L-37.85 0.4 -35.95 -2.15 Q-34.85 -3.65 -34.85 -4.1 L-35.45 -4.8 -36.05 -5.6 Q-36.15 -7.05 -36.45 -7.6 L-37.25 -9.75 -37.85 -11.8 -37.85 -13.0 Q-34.95 -12.95 -34.65 -6.6 -34.15 -6.85 -33.85 -7.8" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 13.5, 40.55)">\n      <path d="M1.05 -33.65 Q4.2 -30.55 1.65 -26.85 L0.5 -25.5 Q-0.2 -25.0 -1.5 -24.85 L-4.2 -24.15 -6.5 -24.25 Q-8.6 -23.9 -10.55 -24.95 -13.2 -26.65 -13.5 -29.85 L-12.05 -31.1 Q-11.95 -33.7 -10.2 -35.5 -9.15 -36.75 -7.75 -37.15 L-7.35 -40.55 Q-0.9 -35.6 1.05 -33.65" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="68.95px" width="46.9px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 28.9, 59.25)">\n    <use height="33.35" transform="matrix(1.0, 0.0, 0.0, 1.0, -11.6, -23.65)" width="27.35" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -13.95, -35.9)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.6, 23.65)">\n      <path d="M10.15 2.6 Q11.4 1.95 12.3 0.1 13.25 -1.7 13.25 -3.4 13.25 -6.9 10.65 -11.1 8.0 -15.35 8.0 -16.95 L8.1 -19.1 Q8.4 -20.25 9.65 -21.15" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M9.6 -0.8 Q9.6 2.5 7.35 4.85 5.1 7.2 1.9 7.2 -1.3 7.2 -3.55 4.85 -5.8 2.5 -5.8 -0.8 -5.8 -4.1 -3.55 -6.45 -1.3 -8.8 1.9 -8.8 5.1 -8.8 7.35 -6.45 9.6 -4.1 9.6 -0.8" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M9.6 -0.8 Q9.6 2.5 7.35 4.85 5.1 7.2 1.9 7.2 -1.3 7.2 -3.55 4.85 -5.8 2.5 -5.8 -0.8 -5.8 -4.1 -3.55 -6.45 -1.3 -8.8 1.9 -8.8 5.1 -8.8 7.35 -6.45 9.6 -4.1 9.6 -0.8 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M3.4 -13.3 Q3.4 -10.65 1.6 -8.8 -0.25 -6.9 -2.85 -6.9 -5.4 -6.9 -7.25 -8.8 -9.1 -10.65 -9.1 -13.3 -9.1 -15.95 -7.25 -17.85 -5.4 -19.7 -2.85 -19.7 -0.25 -19.7 1.6 -17.85 3.4 -15.95 3.4 -13.3" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M3.4 -13.3 Q3.4 -10.65 1.6 -8.8 -0.25 -6.9 -2.85 -6.9 -5.4 -6.9 -7.25 -8.8 -9.1 -10.65 -9.1 -13.3 -9.1 -15.95 -7.25 -17.85 -5.4 -19.7 -2.85 -19.7 -0.25 -19.7 1.6 -17.85 3.4 -15.95 3.4 -13.3 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-7.25 2.75 Q-7.0 4.45 -5.75 4.4 -4.3 4.3 -4.0 5.0 -3.45 6.1 -2.7 6.5 L-0.5 6.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-7.25 -15.0 L-7.0 -4.35 -7.1 -0.75 Q-7.45 1.25 -8.75 1.0 L-8.75 2.25 -8.5 2.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M3.0 -12.25 Q4.05 -12.4 4.45 -10.6 4.9 -8.75 6.25 -8.75 6.15 -7.85 6.55 -6.15 L7.0 -4.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="68.95px" width="46.9px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 28.9, 59.25)">\n    <use height="45.2" transform="matrix(1.0, 0.0, 0.0, 1.0, -14.25, -35.95)" width="30.0" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -18.95, -36.05)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 14.25, 35.95)">\n      <path d="M10.15 -9.7 Q11.4 -10.35 12.3 -12.2 13.25 -14.0 13.25 -15.7 13.25 -19.2 10.65 -23.4 8.0 -27.65 8.0 -29.25 L8.1 -31.4 Q8.4 -32.55 9.65 -33.45" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M11.15 -8.3 Q11.15 -5.0 8.9 -2.65 6.65 -0.3 3.45 -0.3 0.25 -0.3 -2.0 -2.65 -4.25 -5.0 -4.25 -8.3 -4.25 -11.6 -2.0 -13.95 0.25 -16.3 3.45 -16.3 6.65 -16.3 8.9 -13.95 11.15 -11.6 11.15 -8.3" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M11.15 -8.3 Q11.15 -5.0 8.9 -2.65 6.65 -0.3 3.45 -0.3 0.25 -0.3 -2.0 -2.65 -4.25 -5.0 -4.25 -8.3 -4.25 -11.6 -2.0 -13.95 0.25 -16.3 3.45 -16.3 6.65 -16.3 8.9 -13.95 11.15 -11.6 11.15 -8.3 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M0.75 -18.9 Q0.75 -16.25 -1.05 -14.4 -2.9 -12.5 -5.5 -12.5 -8.05 -12.5 -9.9 -14.4 -11.75 -16.25 -11.75 -18.9 -11.75 -21.55 -9.9 -23.45 -8.05 -25.3 -5.5 -25.3 -2.9 -25.3 -1.05 -23.45 0.75 -21.55 0.75 -18.9" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M0.75 -18.9 Q0.75 -16.25 -1.05 -14.4 -2.9 -12.5 -5.5 -12.5 -8.05 -12.5 -9.9 -14.4 -11.75 -16.25 -11.75 -18.9 -11.75 -21.55 -9.9 -23.45 -8.05 -25.3 -5.5 -25.3 -2.9 -25.3 -1.05 -23.45 0.75 -21.55 0.75 -18.9 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-2.5 6.75 Q-0.2 6.05 -0.15 1.85 -0.05 -2.85 1.0 -3.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M6.25 5.25 Q6.95 5.15 9.3 1.9 11.75 -1.4 11.75 -2.6 11.75 -3.15 10.7 -4.3 L9.25 -5.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-11.05 -16.9 L-8.05 -6.7 -7.2 -3.15 Q-7.05 -1.15 -8.35 -1.1 L-8.0 0.1 -7.75 0.05" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M3.0 -12.25 Q4.05 -12.4 4.45 -10.6 4.9 -8.75 6.25 -8.75 6.15 -7.85 6.55 -6.15 L7.0 -4.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M0.35 -23.0 L-1.25 -23.0 0.5 -21.45 Q1.35 -20.55 2.5 -20.25 3.2 -20.05 3.6 -19.0 L3.9 -18.0 4.25 -18.0 4.5 -18.0 Q3.85 -18.75 2.5 -21.4 1.7 -23.0 0.35 -23.0 M1.5 -19.5 Q2.6 -19.15 3.0 -17.75 3.2 -17.95 3.9 -18.0 L4.25 -17.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="68.95px" width="46.9px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 28.9, 59.25)">\n    <use height="48.8" transform="matrix(1.0, 0.0, 0.0, 1.0, -22.5, -40.8)" width="40.5" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -23.7, -53.1)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 22.5, 40.8)">\n      <path d="M4.25 -20.5 L12.3 -21.85 Q15.5 -23.2 15.5 -28.15 15.5 -29.45 15.0 -31.2 L14.5 -33.4 Q14.5 -34.25 15.0 -35.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M6.25 -21.3 Q6.25 -18.0 4.0 -15.65 1.75 -13.3 -1.45 -13.3 -4.65 -13.3 -6.9 -15.65 -9.15 -18.0 -9.15 -21.3 -9.15 -24.6 -6.9 -26.95 -4.65 -29.3 -1.45 -29.3 1.75 -29.3 4.0 -26.95 6.25 -24.6 6.25 -21.3" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M6.25 -21.3 Q6.25 -18.0 4.0 -15.65 1.75 -13.3 -1.45 -13.3 -4.65 -13.3 -6.9 -15.65 -9.15 -18.0 -9.15 -21.3 -9.15 -24.6 -6.9 -26.95 -4.65 -29.3 -1.45 -29.3 1.75 -29.3 4.0 -26.95 6.25 -24.6 6.25 -21.3 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-1.25 -31.9 Q-1.25 -29.25 -3.05 -27.4 -4.9 -25.5 -7.5 -25.5 -10.05 -25.5 -11.9 -27.4 -13.75 -29.25 -13.75 -31.9 -13.75 -34.55 -11.9 -36.45 -10.05 -38.3 -7.5 -38.3 -4.9 -38.3 -3.05 -36.45 -1.25 -34.55 -1.25 -31.9" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-1.25 -31.9 Q-1.25 -29.25 -3.05 -27.4 -4.9 -25.5 -7.5 -25.5 -10.05 -25.5 -11.9 -27.4 -13.75 -29.25 -13.75 -31.9 -13.75 -34.55 -11.9 -36.45 -10.05 -38.3 -7.5 -38.3 -4.9 -38.3 -3.05 -36.45 -1.25 -34.55 -1.25 -31.9 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-3.2 5.5 Q-2.45 4.65 -2.5 0.4 -2.6 -3.7 -1.2 -4.75 -3.25 -7.55 -2.95 -16.0 L-4.7 -16.0 Q-4.7 -15.8 -5.25 -15.4 -5.85 -15.0 -6.2 -15.0 L-6.2 -12.75 -5.1 -9.65 Q-4.9 -8.7 -4.25 -7.9 -3.6 -7.1 -3.45 -6.0 L-2.95 -6.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M4.0 3.25 L4.75 3.25 Q4.75 -1.0 5.5 -2.5 L6.75 -5.25 7.5 -7.15 Q7.5 -7.75 5.0 -9.7 2.5 -11.7 2.5 -13.0 L2.65 -14.0 2.75 -15.25 5.25 -15.5 5.25 -11.5" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-20.0 -30.75 L-19.6 -28.35 Q-19.05 -27.0 -17.5 -27.25 L-17.5 -24.75 -15.0 -24.75 -14.5 -25.75 -14.75 -25.5 -14.75 -26.0 Q-14.75 -26.8 -15.5 -30.65 -15.5 -31.2 -15.0 -31.4 L-14.0 -31.75 -15.0 -32.0 -14.85 -32.7 Q-14.65 -33.1 -14.25 -33.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="68.95px" width="46.9px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 28.9, 59.25)">\n    <use height="40.8" transform="matrix(1.0, 0.0, 0.0, 1.0, -22.75, -49.3)" width="40.75" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -28.4, -57.0)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 22.75, 49.3)">\n      <path d="M2.5 -34.25 L4.15 -35.0 Q5.35 -35.75 5.25 -36.75 L7.75 -36.75 Q7.4 -34.5 9.25 -34.5 L9.5 -33.0 14.0 -33.0 14.85 -34.0 15.5 -34.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M3.7 -32.55 Q3.7 -29.25 1.45 -26.9 -0.8 -24.55 -4.0 -24.55 -7.2 -24.55 -9.45 -26.9 -11.7 -29.25 -11.7 -32.55 -11.7 -35.85 -9.45 -38.2 -7.2 -40.55 -4.0 -40.55 -0.8 -40.55 1.45 -38.2 3.7 -35.85 3.7 -32.55" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M3.7 -32.55 Q3.7 -29.25 1.45 -26.9 -0.8 -24.55 -4.0 -24.55 -7.2 -24.55 -9.45 -26.9 -11.7 -29.25 -11.7 -32.55 -11.7 -35.85 -9.45 -38.2 -7.2 -40.55 -4.0 -40.55 -0.8 -40.55 1.45 -38.2 3.7 -35.85 3.7 -32.55 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-5.5 -40.4 Q-5.5 -37.75 -7.3 -35.9 -9.15 -34.0 -11.75 -34.0 -14.3 -34.0 -16.15 -35.9 -18.0 -37.75 -18.0 -40.4 -18.0 -43.05 -16.15 -44.95 -14.3 -46.8 -11.75 -46.8 -9.15 -46.8 -7.3 -44.95 -5.5 -43.05 -5.5 -40.4" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-5.5 -40.4 Q-5.5 -37.75 -7.3 -35.9 -9.15 -34.0 -11.75 -34.0 -14.3 -34.0 -16.15 -35.9 -18.0 -37.75 -18.0 -40.4 -18.0 -43.05 -16.15 -44.95 -14.3 -46.8 -11.75 -46.8 -9.15 -46.8 -7.3 -44.95 -5.5 -43.05 -5.5 -40.4 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-9.5 -26.5 Q-9.5 -24.25 -7.75 -19.0 L-5.25 -19.0 Q-4.75 -20.0 -4.75 -21.0 L-4.5 -21.0 Q-4.65 -19.7 -3.85 -15.85 -3.1 -12.1 -3.25 -11.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M4.5 -13.25 Q4.5 -14.25 5.0 -14.75 L5.0 -23.75 2.75 -23.5 2.5 -29.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-19.5 -39.0 L-19.25 -30.75 -19.25 -30.25 -18.85 -30.75 Q-17.5 -32.45 -17.5 -36.0 -17.0 -35.5 -15.75 -35.5 L-15.75 -29.0 -15.25 -29.0 Q-14.85 -30.1 -13.4 -31.75 -11.95 -33.35 -11.5 -34.75 M-19.25 -30.25 L-19.25 -27.75 -20.0 -27.75 -20.1 -27.9 -20.25 -28.4 Q-20.25 -29.0 -19.25 -30.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e) {
	t.exports = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" height="68.95px" width="46.9px" xmlns="http://www.w3.org/2000/svg">\n  <g transform="matrix(1.0, 0.0, 0.0, 1.0, 28.9, 59.25)">\n    <use height="32.85" transform="matrix(1.0, 0.0, 0.0, 1.0, -25.25, -54.6)" width="42.0" xlink:href="#shape0"/>\n    <use height="19.75" transform="matrix(1.0, 0.0, 0.0, 1.0, -28.9, -59.25)" width="18.45" xlink:href="#shape1"/>\n  </g>\n  <defs>\n    <g id="shape0" transform="matrix(1.0, 0.0, 0.0, 1.0, 25.25, 54.6)">\n      <path d="M-1.5 -40.75 Q1.3 -41.15 7.65 -40.75 12.9 -40.8 14.25 -43.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-0.6 -39.55 Q-0.6 -36.25 -2.85 -33.9 -5.1 -31.55 -8.3 -31.55 -11.5 -31.55 -13.75 -33.9 -16.0 -36.25 -16.0 -39.55 -16.0 -42.85 -13.75 -45.2 -11.5 -47.55 -8.3 -47.55 -5.1 -47.55 -2.85 -45.2 -0.6 -42.85 -0.6 -39.55" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-0.6 -39.55 Q-0.6 -36.25 -2.85 -33.9 -5.1 -31.55 -8.3 -31.55 -11.5 -31.55 -13.75 -33.9 -16.0 -36.25 -16.0 -39.55 -16.0 -42.85 -13.75 -45.2 -11.5 -47.55 -8.3 -47.55 -5.1 -47.55 -2.85 -45.2 -0.6 -42.85 -0.6 -39.55 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-9.0 -45.7 Q-9.0 -43.05 -10.8 -41.2 -12.65 -39.3 -15.25 -39.3 -17.8 -39.3 -19.65 -41.2 -21.5 -43.05 -21.5 -45.7 -21.5 -48.35 -19.65 -50.25 -17.8 -52.1 -15.25 -52.1 -12.65 -52.1 -10.8 -50.25 -9.0 -48.35 -9.0 -45.7" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M-9.0 -45.7 Q-9.0 -43.05 -10.8 -41.2 -12.65 -39.3 -15.25 -39.3 -17.8 -39.3 -19.65 -41.2 -21.5 -43.05 -21.5 -45.7 -21.5 -48.35 -19.65 -50.25 -17.8 -52.1 -15.25 -52.1 -12.65 -52.1 -10.8 -50.25 -9.0 -48.35 -9.0 -45.7 Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-10.25 -37.25 Q-10.95 -37.0 -11.85 -35.55 L-13.0 -33.75 -13.0 -31.75 -6.75 -31.5 -6.75 -30.25 -10.2 -27.95 Q-12.3 -26.4 -12.25 -24.25" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-1.25 -32.0 Q-1.8 -30.8 -3.65 -28.7 -5.35 -26.8 -5.75 -25.75 L-7.75 -25.75" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-21.25 -40.75 L-21.0 -40.75 -20.75 -35.0 Q-20.3 -33.15 -20.35 -31.35 -20.4 -27.85 -22.75 -27.5" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n      <path d="M-16.5 -37.0 L-16.45 -32.45 Q-16.45 -29.75 -17.0 -28.5 -16.75 -28.5 -16.25 -29.0" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.0"/>\n    </g>\n    <g id="shape1" transform="matrix(1.0, 0.0, 0.0, 1.0, 11.15, 40.2)">\n      <path d="M7.25 -27.25 Q6.95 -24.0 4.1 -22.8 1.4 -20.15 -3.0 -20.5 -5.55 -21.35 -7.95 -22.65 -10.9 -24.3 -11.15 -27.85 -11.35 -31.25 -9.15 -33.9 -6.95 -36.6 -3.55 -37.05 -0.15 -37.45 2.65 -35.55 5.45 -33.6 6.7 -30.45 7.4 -28.95 7.25 -27.25" fill="#000000" fill-rule="evenodd" stroke="none"/>\n      <path d="M2.35 -40.15 Q4.05 -40.6 5.85 -33.7 6.4 -31.55 6.35 -30.85 L5.1 -30.5 Q2.45 -31.6 0.95 -32.6 -1.1 -33.95 -1.9 -35.55 L-1.8 -35.6 -1.7 -35.8 -0.95 -35.6 -0.6 -35.45 0.45 -37.8 Q1.55 -39.95 2.35 -40.15 M-10.7 -35.5 L-10.25 -39.95 Q-8.95 -39.25 -7.85 -38.35 -6.05 -36.95 -5.7 -35.8 -5.35 -34.35 -6.85 -32.8 -8.1 -31.4 -9.8 -30.8 -10.75 -32.55 -10.7 -35.5" fill="#000000" fill-rule="evenodd" stroke="none"/>\n    </g>\n  </defs>\n</svg>\n'
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = n(0),
		s = n(1),
		a = n(21),
		l = function(t) {
			function e(e) {
				var n = t.call(this, e, 0, 0, "__DEFAULT") || this;
				return n.on("animationrepeat", function() {
					n.moveForward()
				}), n.solver = a.
			default, n.direction = s.
			default.catDefaultDirection, n.reset(), n
			}
			return r(e, t), Object.defineProperty(e.prototype, "i", {
				get: function() {
					return this.getData("i")
				},
				set: function(t) {
					this.setData("i", t)
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "j", {
				get: function() {
					return this.getData("j")
				},
				set: function(t) {
					this.setData("j", t)
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "direction", {
				get: function() {
					return this.getData("direction")
				},
				set: function(t) {
					this.setData("direction", t), this.resetTextureToStop(), this.resetOriginAndScale()
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(e.prototype, "solver", {
				get: function() {
					return this.getData("solver")
				},
				set: function(t) {
					this.setData("solver", t)
				},
				enumerable: !0,
				configurable: !0
			}), e.prototype.reset = function() {
				this.anims.stop(), this.direction = s.
			default.catDefaultDirection, this.resetIJ()
			}, e.prototype.step = function() {
				var t = this.solver.call(this, this.scene.blocksData, this.i, this.j);
				return t < 0 || t > 6 ? (this.caught(), !1) : !! this.stepDirection(t) || (this.caught(), !1)
			}, e.prototype.isCaught = function() {
				var t = this;
				return !this.getCurrentNeighbours().some(function(e, n) {
					var o = t.scene.getBlock(e.i, e.j);
					return null !== o && !o.isWall
				})
			}, e.prototype.caught = function() {
				this.setTexture(s.
			default.cannotEscapeTextures[s.
			default.directions[this.direction].name])
			}, e.prototype.escape = function() {
				0 === this.j || this.j === this.scene.h - 1 ? this.runForward() : 0 === this.i ? this.runDirection(0) : this.i === this.scene.w - 1 && this.runDirection(3)
			}, e.prototype.setIJ = function(t, e) {
				this.i = t, this.j = e;
				var n = this.scene.getPosition(t, e);
				return this.setPosition(n.x, n.y)
			}, e.prototype.resetIJ = function() {
				this.setIJ(Math.floor(this.scene.w / 2), Math.floor(this.scene.h / 2))
			}, e.prototype.isEscaped = function() {
				return this.i <= 0 || this.i >= this.scene.w - 1 || this.j <= 0 || this.j >= this.scene.h - 1
			}, e.prototype.checkState = function() {
				this.isEscaped() ? (this.escape(), this.emit("escaped")) : this.isCaught() && (this.caught(), this.emit("win"))
			}, e.prototype.getCurrentNeighbours = function() {
				return i.
			default.getNeighbours(this.i, this.j)
			}, e.prototype.resetTextureToStop = function() {
				this.setTexture(s.
			default.stopTextures[s.
			default.directions[this.direction].name])
			}, e.prototype.resetOriginAndScale = function() {
				var t = s.
			default.directions[this.direction],
					e = s.
				default.origins[t.name];
				this.setOrigin(e.x, e.y), this.scaleX = t.scaleX
			}, e.prototype.moveForward = function() {
				var t = this.getCurrentNeighbours()[this.direction];
				this.setIJ(t.i, t.j), this.checkState()
			}, e.prototype.stepForward = function() {
				var t = this,
					e = this.getCurrentNeighbours()[this.direction],
					n = this.scene.getBlock(e.i, e.j);
				return null !== n && (!n.isWall && (this.play(s.
			default.directions[this.direction].name + "_step"), this.once("animationcomplete", function() {
					t.moveForward(), t.resetTextureToStop()
				}), !0))
			}, e.prototype.stepDirection = function(t) {
				return this.direction = t, this.stepForward()
			}, e.prototype.runForward = function() {
				this.play(s.
			default.directions[this.direction].name + "_run")
			}, e.prototype.runDirection = function(t) {
				this.direction = t, this.runForward()
			}, e
		}(Phaser.GameObjects.Sprite);
	e.
default = l
}, function(t, e, n) {
	"use strict";
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var o = n(0);
	e.
default = function(t, e, n) {
		var r = -1;
		return o.
	default.getNeighbours(e, n).forEach(function(e, n) {
			-1 === r && (void 0 === t[e.i] || void 0 === t[e.i][e.j] || t[e.i][e.j] || (r = n))
		}), r
	}
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = function(t) {
			function e(e, n, o, r) {
				var i = this,
					s = e.getPosition(n, o);
				(i = t.call(this, e, s.x, s.y, r, 0, 360, !1, 0, 1) || this).i = n, i.j = o, i.r = r, i.isWall = !1;
				var a = new Phaser.Geom.Circle(i.r / 2, i.r / 2, i.r);
				return i.setInteractive(a, Phaser.Geom.Circle.Contains), i.on("pointerdown", function() {
					i.emit("player_click", i.i, i.j)
				}), i
			}
			return r(e, t), Object.defineProperty(e.prototype, "isWall", {
				get: function() {
					return this._isWall
				},
				set: function(t) {
					this._isWall = t, this.fillColor = t ? 13158 : 11786751
				},
				enumerable: !0,
				configurable: !0
			}), e
		}(Phaser.GameObjects.Arc);
	e.
default = i
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = n(2),
		s = function(t) {
			function e(e) {
				var n = t.call(this, e, 0, 0, i.
			default ("重置"), {}) || this;
				n.setColor("#000000");
				var o = e.r;
				n.setFontSize(o), n.setPadding(o, o, o, o), n.setPosition(0, e.game.canvas.height), n.setOrigin(0, 1);
				var r = new Phaser.Geom.Rectangle(0, 0, n.width, n.height);
				return n.setInteractive(r, Phaser.Geom.Rectangle.Contains), n
			}
			return r(e, t), e
		}(Phaser.GameObjects.Text);
	e.
default = s
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = function(t) {
			function e(e) {
				var n = t.call(this, e, 0, 0, "", {}) || this;
				n.setColor("#000000");
				var o = e.r;
				return n.setFontSize(o), "center" === e.game.myConfig.statusBarAlign && (n.setX(e.game.canvas.width / 2), n.setOrigin(.5, 0)), n.setPadding(o, o, o, o), n
			}
			return r(e, t), e
		}(Phaser.GameObjects.Text);
	e.
default = i
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = function(t) {
			function e(e) {
				var n = t.call(this, e, 0, 0, "", {}) || this;
				n.setColor("#000000"), n.setPosition(e.game.canvas.width, e.game.canvas.height), n.setOrigin(1, 1);
				var o = e.r;
				return n.setFontSize(.8 * o), n.setPadding(o, o, o, o), n.setText(e.game.myConfig.credit), n
			}
			return r(e, t), e
		}(Phaser.GameObjects.Text);
	e.
default = i
}, function(t, e, n) {
	"use strict";
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var o = n(0),
		r = function() {
			function t(t, e, n, o) {
				this.i = e, this.j = n, this.isWall = o, this.distance = 1 / 0, this.parent = t, this.isEdge = this.i <= 0 || this.i >= this.parent.w - 1 || this.j <= 0 || this.j >= this.parent.h - 1
			}
			return Object.defineProperty(t.prototype, "routesCount", {
				get: function() {
					var t = this;
					if (void 0 === this._routesCount) if (this.isEdge) this._routesCount = 1;
					else {
						var e = 0;
						this.neighbours.forEach(function(n) {
							null === n || n.isWall || n.distance < t.distance && (e += n.routesCount)
						}), this._routesCount = e
					}
					return this._routesCount
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(t.prototype, "neighbours", {
				get: function() {
					var t = this;
					if (void 0 === this._neighbours) {
						var e = o.
					default.getNeighbours(this.i, this.j);
						this._neighbours = e.map(function(e) {
							return t.parent.getBlock(e.i, e.j)
						})
					}
					return this._neighbours
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(t.prototype, "directions", {
				get: function() {
					var t = this,
						e = [];
					return this.neighbours.forEach(function(n, o) {
						null === n || n.isWall || n.distance < t.distance && e.push(o)
					}), e
				},
				enumerable: !0,
				configurable: !0
			}), Object.defineProperty(t.prototype, "direction", {
				get: function() {
					var t = this,
						e = 0,
						n = -1;
					return this.directions.forEach(function(o) {
						var r = t.neighbours[o];
						r.routesCount > e && (e = r.routesCount, n = o)
					}), n
				},
				enumerable: !0,
				configurable: !0
			}), t
		}(),
		i = function() {
			function t(t) {
				var e = this;
				if (this.w = t.length, this.w <= 0) throw new Error("empty blocks");
				this.h = t[0].length, this.blocks = t.map(function(n, o) {
					return n.map(function(n, i) {
						return new r(e, o, i, t[o][i])
					})
				})
			}
			return t.prototype.getBlock = function(t, e) {
				return t >= 0 && t < this.w && e >= 0 && e < this.h ? this.blocks[t][e] : null
			}, t.prototype.calcAllDistances = function() {
				var t = [];
				this.blocks.forEach(function(e) {
					e.forEach(function(e) {
						e.isEdge && !e.isWall && (e.distance = 0, t.push(e))
					})
				});
				for (var e = function() {
						var e = t.shift();
						e.neighbours.forEach(function(n) {
							null === n || n.isEdge || n.isWall || n.distance > e.distance + 1 && (n.distance = e.distance + 1, t.indexOf(n) < 0 && t.push(n))
						})
					}; t.length > 0;) e()
			}, t.prototype.toString = function() {
				for (var t = [], e = 0; e < this.h; e++) {
					for (var n = [], o = 0; o < this.w; o++) {
						var r = this.getBlock(o, e);
						r.isWall ? n.push("*") : r.distance === 1 / 0 ? n.push("-") : n.push(r.distance)
					}
					var i = n.join(" ");
					1 == (1 & e) && (i = " " + i), t.push(i)
				}
				return t.join("\n")
			}, t.prototype.toString2 = function() {
				for (var t = [], e = 0; e < this.h; e++) {
					for (var n = [], o = 0; o < this.w; o++) {
						var r = this.getBlock(o, e);
						r.isWall ? n.push("*") : r.routesCount === 1 / 0 ? n.push("-") : n.push(r.routesCount)
					}
					var i = n.join(" ");
					1 == (1 & e) && (i = " " + i), t.push(i)
				}
				return t.join("\n")
			}, t
		}();
	e.nearestSolver = function(t, e, n) {
		var o = new i(t);
		o.calcAllDistances();
		var r = o.getBlock(e, n).directions;
		return r.length > 0 ? r[0] : -1
	}, e.
default = function(t, e, n) {
		var o = new i(t);
		return o.calcAllDistances(), o.getBlock(e, n).direction
	}
}, function(t, e, n) {
	"use strict";
	var o, r = this && this.__extends || (o = function(t, e) {
		return (o = Object.setPrototypeOf || {
			__proto__: []
		}
		instanceof Array &&
		function(t, e) {
			t.__proto__ = e
		} ||
		function(t, e) {
			for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
		})(t, e)
	}, function(t, e) {
		function n() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
	});
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var i = n(28),
		s = function(t) {
			function e(e, n, o, r) {
				var i = t.call(this, e, n, void 0, r) || this;
				return i.rawData = o, i
			}
			return r(e, t), e.prototype.load = function() {
				this.state === Phaser.Loader.FILE_POPULATED ? this.loader.nextFile(this, !0) : this.xhrLoader = i.
			default (this, this.loader.xhr)
			}, e
		}(Phaser.Loader.FileTypes.SVGFile);
	e.
default = s
}, function(t, e, n) {
	"use strict";
	Object.defineProperty(e, "__esModule", {
		value: !0
	});
	var o = n(29);
	e.
default = function(t, e) {
		var n = new o.
	default;
		return n.open("GET", t.src, e.async, e.user, e.password), n.responseType = t.xhrSettings.responseType, n.timeout = e.timeout, e.header && e.headerValue && n.setRequestHeader(e.header, e.headerValue), e.requestedWith && n.setRequestHeader("X-Requested-With", e.requestedWith), e.overrideMimeType && n.overrideMimeType(e.overrideMimeType), n.onload = t.onLoad.bind(t, n), n.onerror = t.onError.bind(t), n.onprogress = t.onProgress.bind(t), n.send(), setTimeout(function() {
			n.respond(200, {
				"Content-Type": "application/octet-stream"
			}, t.rawData)
		}, 1), n
	}
}, function(t, e, n) {
	"use strict";
	n.r(e);
	var o = function(t, e, n, o) {
			this.type = t, this.bubbles = e, this.cancelable = n, this.target = o
		};
	o.prototype = {
		stopPropagation: function() {},
		preventDefault: function() {
			this.defaultPrevented = !0
		}
	};
	var r = {
		100: "Continue",
		101: "Switching Protocols",
		200: "OK",
		201: "Created",
		202: "Accepted",
		203: "Non-Authoritative Information",
		204: "No Content",
		205: "Reset Content",
		206: "Partial Content",
		300: "Multiple Choice",
		301: "Moved Permanently",
		302: "Found",
		303: "See Other",
		304: "Not Modified",
		305: "Use Proxy",
		307: "Temporary Redirect",
		400: "Bad Request",
		401: "Unauthorized",
		402: "Payment Required",
		403: "Forbidden",
		404: "Not Found",
		405: "Method Not Allowed",
		406: "Not Acceptable",
		407: "Proxy Authentication Required",
		408: "Request Timeout",
		409: "Conflict",
		410: "Gone",
		411: "Length Required",
		412: "Precondition Failed",
		413: "Request Entity Too Large",
		414: "Request-URI Too Long",
		415: "Unsupported Media Type",
		416: "Requested Range Not Satisfiable",
		417: "Expectation Failed",
		422: "Unprocessable Entity",
		500: "Internal Server Error",
		501: "Not Implemented",
		502: "Bad Gateway",
		503: "Service Unavailable",
		504: "Gateway Timeout",
		505: "HTTP Version Not Supported"
	};
	var i = {
		"Accept-Charset": !0,
		"Accept-Encoding": !0,
		Connection: !0,
		"Content-Length": !0,
		Cookie: !0,
		Cookie2: !0,
		"Content-Transfer-Encoding": !0,
		Date: !0,
		Expect: !0,
		Host: !0,
		"Keep-Alive": !0,
		Referer: !0,
		TE: !0,
		Trailer: !0,
		"Transfer-Encoding": !0,
		Upgrade: !0,
		"User-Agent": !0,
		Via: !0
	};

	function s(t, e) {
		e.addEventListener(t, function(n) {
			var o = e["on" + t];
			o && "function" == typeof o && o.call(n.target, n)
		})
	}
	function a() {
		this._eventListeners = {};
		for (var t = ["loadstart", "progress", "load", "abort", "loadend"], e = t.length - 1; e >= 0; e--) s(t[e], this)
	}
	function l() {
		a.call(this), this.readyState = l.UNSENT, this.requestHeaders = {}, this.requestBody = null, this.status = 0, this.statusText = "", this.upload = new a
	}
	a.prototype = {
		addEventListener: function(t, e) {
			this._eventListeners[t] = this._eventListeners[t] || [], this._eventListeners[t].push(e)
		},
		removeEventListener: function(t, e) {
			for (var n = this._eventListeners[t] || [], o = 0, r = n.length; o < r; ++o) if (n[o] == e) return n.splice(o, 1)
		},
		dispatchEvent: function(t) {
			for (var e = t.type, n = this._eventListeners[e] || [], o = 0; o < n.length; o++)"function" == typeof n[o] ? n[o].call(this, t) : n[o].handleEvent(t);
			return !!t.defaultPrevented
		},
		_progress: function(t, e, n) {
			var r = new o("progress");
			r.target = this, r.lengthComputable = t, r.loaded = e, r.total = n, this.dispatchEvent(r)
		}
	}, l.prototype = new a, l.UNSENT = 0, l.OPENED = 1, l.HEADERS_RECEIVED = 2, l.LOADING = 3, l.DONE = 4;
	var d = {
		UNSENT: 0,
		OPENED: 1,
		HEADERS_RECEIVED: 2,
		LOADING: 3,
		DONE: 4,
		async: !0,
		withCredentials: !1,
		open: function(t, e, n, o, r) {
			this.method = t, this.url = e, this.async = "boolean" != typeof n || n, this.username = o, this.password = r, this.responseText = null, this.responseXML = null, this.responseURL = e, this.requestHeaders = {}, this.sendFlag = !1, this._readyStateChange(l.OPENED)
		},
		setRequestHeader: function(t, e) {
			if (u(this), i[t] || /^(Sec-|Proxy-)/.test(t)) throw new Error('Refused to set unsafe header "' + t + '"');
			this.requestHeaders[t] ? this.requestHeaders[t] += "," + e : this.requestHeaders[t] = e
		},
		send: function(t) {
			if (u(this), !/^(get|head)$/i.test(this.method)) {
				var e = !1;
				Object.keys(this.requestHeaders).forEach(function(t) {
					"content-type" === t.toLowerCase() && (e = !0)
				}), e || (t || "").toString().match("FormData") || (this.requestHeaders["Content-Type"] = "text/plain;charset=UTF-8"), this.requestBody = t
			}
			this.errorFlag = !1, this.sendFlag = this.async, this._readyStateChange(l.OPENED), "function" == typeof this.onSend && this.onSend(this), this.dispatchEvent(new o("loadstart", !1, !1, this))
		},
		abort: function() {
			this.aborted = !0, this.responseText = null, this.errorFlag = !0, this.requestHeaders = {}, this.dispatchEvent(new o("abort", !1, !1, this)), this.readyState > l.UNSENT && this.sendFlag && (this._readyStateChange(l.UNSENT), this.sendFlag = !1), "function" == typeof this.onerror && this.onerror()
		},
		getResponseHeader: function(t) {
			if (this.readyState < l.HEADERS_RECEIVED) return null;
			if (/^Set-Cookie2?$/i.test(t)) return null;
			for (var e in t = t.toLowerCase(), this.responseHeaders) if (e.toLowerCase() == t) return this.responseHeaders[e];
			return null
		},
		getAllResponseHeaders: function() {
			if (this.readyState < l.HEADERS_RECEIVED) return "";
			var t = "";
			for (var e in this.responseHeaders) this.responseHeaders.hasOwnProperty(e) && !/^Set-Cookie2?$/i.test(e) && (t += e + ": " + this.responseHeaders[e] + "\r\n");
			return t
		},
		overrideMimeType: function(t) {
			"string" == typeof t && (this.forceMimeType = t.toLowerCase())
		},
		_readyStateChange: function(t) {
			this.readyState = t, "function" == typeof this.onreadystatechange && this.onreadystatechange(new o("readystatechange")), this.dispatchEvent(new o("readystatechange")), this.readyState == l.DONE && this.dispatchEvent(new o("load", !1, !1, this)), this.readyState != l.UNSENT && this.readyState != l.DONE || this.dispatchEvent(new o("loadend", !1, !1, this))
		},
		_setResponseHeaders: function(t) {
			for (var e in this.responseHeaders = {}, t) t.hasOwnProperty(e) && (this.responseHeaders[e] = t[e]);
			this.forceMimeType && (this.responseHeaders["Content-Type"] = this.forceMimeType), this.async ? this._readyStateChange(l.HEADERS_RECEIVED) : this.readyState = l.HEADERS_RECEIVED
		},
		_setResponseBody: function(t) {
			!
			function(t) {
				if (t.readyState == l.DONE) throw new Error("Request done")
			}(this), function(t) {
				if (t.async && t.readyState != l.HEADERS_RECEIVED) throw new Error("No headers received")
			}(this), function(t) {
				if ("string" != typeof t) {
					var e = new Error("Attempted to respond to fake XMLHttpRequest with " + t + ", which is not a string.");
					throw e.name = "InvalidBodyException", e
				}
			}(t);
			var e = this.chunkSize || 10,
				n = 0;
			this.responseText = "";
			do {
				this.async && this._readyStateChange(l.LOADING), this.responseText += t.substring(n, n + e), n += e
			} while (n < t.length);
			var o, r, i = this.getResponseHeader("Content-Type");
			if (this.responseText && (!i || /(text\/xml)|(application\/xml)|(\+xml)/.test(i))) try {
				this.responseXML = (o = this.responseText, "undefined" != typeof DOMParser ? r = (new DOMParser).parseFromString(o, "text/xml") : ((r = new ActiveXObject("Microsoft.XMLDOM")).async = "false", r.loadXML(o)), r)
			} catch (t) {}
			this.async ? this._readyStateChange(l.DONE) : this.readyState = l.DONE
		},
		respond: function(t, e, n) {
			this._setResponseHeaders(e || {}), this.status = "number" == typeof t ? t : 200, this.statusText = r[this.status], this._setResponseBody(n || "")
		}
	};
	for (var h in d) l.prototype[h] = d[h];

	function u(t) {
		if (t.readyState !== l.OPENED) throw new Error("INVALID_STATE_ERR");
		if (t.sendFlag) throw new Error("INVALID_STATE_ERR")
	}
	e.
default = l
}]); </script> 
<script>
var myVar = setInterval(myTimer, 1000);
var time = 0;
function myTimer() {
	time += 1;
	document.getElementById("time").innerHTML = time;
}
window.game = new CatchTheCatGame({
	w: 11,
	h: 11,
	r: 20,
	backgroundColor: 16777215,
	parent: "catch-the-cat",
	statusBarAlign: "center",
	credit: "for Amnesia's blog"
})
</script> 

<script async>window.onload=function(){var a=document.createElement('script'),b=document.getElementsByTagName('script')[0];a.type='text/javascript',a.async=!0,a.src='/sw-register.js?v='+Date.now(),b.parentNode.insertBefore(a,b)};</script></body></html>